which-key.nvim icon indicating copy to clipboard operation
which-key.nvim copied to clipboard

Is there a way to extend `wk` from another plugin?

Open leiserfg opened this issue 4 years ago • 4 comments

The idea is that if wk is installed by the user of the plunging then it will get the shortcuts documented but without making wk a hard dependency of it.

leiserfg avatar Nov 09 '21 20:11 leiserfg

I'd rather like if neovim was providing the way to document shortcuts and retrieve that documentation by plugins

I60R avatar Nov 21 '21 13:11 I60R

One can dream but in the meantime, that's something doable from the plugin (as it has some default ones documented already)

leiserfg avatar Nov 21 '21 14:11 leiserfg

Well you can just pcall(require, 'which-key') and then set keybindings using which-key if it is present.

saecki avatar Dec 21 '21 12:12 saecki

Well you can just pcall(require, 'which-key') and then set keybindings using which-key if it is present.

Does this allow to extend or just to overwrite the existing maps? Let's assume the plugin has its maps under p in normal mode. Can I add further/additinol keys under p ?

kraxli avatar Apr 18 '22 21:04 kraxli