nvim-lua / kickstart.nvim

A launch point for your personal nvim configuration
MIT License
18.9k stars 21.68k forks source link

Which-key does not remove key registeres when edit which-key configs #1009

Closed chenxin-yan closed 2 months ago

chenxin-yan commented 3 months ago

Describe the bug

When rewriting the which-keys mapping registers, I encountered some issues. It seems like once keymaps are registered, a key stays in the system, and I am not sure how to "deregister" it. Removing the line register "r" does not remove the keymap registered by which-key. For example, when I remove the key register for 'rename', the cursor moves to the right when I trigger <leader>r instead of doing nothing. I tried to debug it, so I ran :verbose map <leader>r, the output shows that which-key registered the keymap, and it stayed there despite the edit in my which-keys config file. I also tried to reinstall Neovim and the plugins, but the problem still exists.

Xnip2024-07-05_14-56-19

To Reproduce

  1. Remove the register for any of the keymaps in which-key config
  2. restart nvim
  3. press <leader>r

Desktop

Neovim Version

NVIM v0.10.0