diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index a03ab9fe..fdf0ab51 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -445,3 +445,4 @@ - Restore vim-dirtytalk plugin and fix ordering with spellcheck in generated config. - Fix lualine separator options - Add [neogit], an interactive and powerful Git interface for Neovim, inspired by Magit +- Allow deregistering which-key binds or groups by setting them to `null` diff --git a/modules/plugins/utility/binds/which-key/config.nix b/modules/plugins/utility/binds/which-key/config.nix index 68dbbfbf..625a6215 100644 --- a/modules/plugins/utility/binds/which-key/config.nix +++ b/modules/plugins/utility/binds/which-key/config.nix @@ -10,7 +10,7 @@ inherit (lib.nvim.dag) entryAnywhere; cfg = config.vim.binds.whichKey; - register = mapAttrsToList (n: v: mkLuaInline "{ '${n}', desc = '${v}' }") cfg.register; + register = mapAttrsToList (n: v: lib.lists.optional (! isNull v) (mkLuaInline "{ '${n}', desc = '${v}' }")) cfg.register; in { config = mkIf cfg.enable { vim = {