folke / which-key.nvim

💥 Create key bindings that stick. WhichKey helps you remember your Neovim keymaps, by showing available keybindings in a popup as you type.
Apache License 2.0
5.43k stars 177 forks source link

fix(config): obey notify setting for config validation #861

Closed rikardjans closed 1 month ago

rikardjans commented 1 month ago

Description

Obeys notify field for config validation. Even when calling setup before register, as suggested in linked issue, deprecation warnings still results in the notification being shown, while some other warnings, like overlapping mappings or missing dependencies will not trigger the notification.

It is not clear from checkhealth what warnings will result in the message and which will not.

I would assume notify = false would hide all notifications.

This PR adds a check of notify flag in validation before sending the notification

Related Issue(s)

folke commented 1 month ago

validation errors should always be shown since this means there's issues with your config. The notify option is to disable the warning about using register instead of add