nvim-whichkey-setup.lua
nvim-whichkey-setup.lua copied to clipboard
question on local leader maps
First of all, thank you. I've been wanting to corral my which-key lua hacks into a plugin but never got it together. I'm going to be implementing this tonight.
My question is, does this allow having individual local leader which-key popups that are unique to each filetype? so no more of this:
turns out my hacks were almost identical to this plugin. setup took 2 seconds and already so much better.
i have not figured out the buffer specific localleader popup guide though. local leader descriptions persist across buffers, unless they're changed to something else. I used wk.register_keymap('localleader', llmaps, {noremap = true, silent = true, bufnr = 0})
. is this expected?
Hi @klooj! Nice to hear that we found the same solutions :)
Hmm, that's strange. Indeed the intention is that that would setup keybindings only in the current buffer. I have to check what goes wrong. I'm away from my computer until Thursday so will check it then.
No rush. It was so easy to setup that I haven't done a proper deep dive yet. I may figure it out before then.
Cool, let me know if you do :)
@klooj I now understand the issue, which is for the descriptions, i.e. not the keybindings themselves. Do you know how this is normally handled by whichkey actually?
i'm not sure. whichkey did not handle this at all but then the last time i checked, like 6 months ago, a feature a branch was added to handle this specifically. so, i don't know the state of affairs right now.
just so we're on the same page, I framed my initial post as a question because this functionality did not yet exist in the wild, as far i know.
I love the nvim-whichkey-setup plugin but this issue is really quite annoying. Would love if it was fixed soon.
@Famiu I definitely agree but this is not something we can really fix here but should be fixed in which-key itself. As mentioned by @klooj there is an open PR for this but not yet merged. Hopefully this will get merged soon. Whenever that happens I'll make sure to do any updates needed here.