-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow configuring which_key per buffer #48
base: master
Are you sure you want to change the base?
Conversation
Are you ready to merge this? |
Can I help out in some way to get this moving again? |
76bcb4f
to
40c810e
Compare
40c810e
to
15e1923
Compare
@Mange I have updated this branch, the extension should just work, but I haven't tested the |
Great feature ! 💪 |
@gquittet You can try this branch and give the feedback here, it's not well tested as I don't use it heavily. |
I'm testing the branch now. As a test I added this to a " ftplugin/vimwiki.vim
let b:which_key = {}
let b:which_key.t = { 'name': 'wiki' }
let b:which_key.t.S = 'taskwiki-stats' When press leader on one of those buffers I can tell all my original which-key definitions are gone, and I get this error message:
My Pressing it has no effect. Removing those new lines, killing the buffer, and reloading it again restores original which-key functionality, and other file types were not affected during that time. [EDIT:] I should add that I also tested the built-in extension for Vista, and it seems to work well. I get the new custom vista labels there but also some other stuff I do not wish to have there, mainly from GitGutter adding text objects. |
Hello, I'm seeing a few things that I think are not right for this plugin. The plugin already has a neat mechanism to detect existing mappings and display them. Another
This is not right in my opinion, because your global mappings still exist, even in special buffers like nerdtree or vista. So there would be the global mappings description, and some buffer would additionally have custom buffer mappings description. 👉 I was thinking about extending the existing function call which_key#register("<space>", "g:which_key_map") " Global descriptions
call which_key#register("<space>", "b:which_key_map", "merge_if_exist") " Buffer-local descriptions 👉 I might make a PR of my own with what I have in mind, which I think would cover my use-case (global + local) and your use-case (global OR local) with minimal changes. Edit: Do whatever you want, I moved to another which-key-like plugin |
Hi, I am also interested in this feature. I have tried to define some keybindings for latex files. So I haved used de When I open a .tex file I can see this keybindings ( |
b:which_key
. Ifb:which_key
exists, vim-which-key will use the buffer local config instead of the global one.