nvim-treesitter-textobjects
nvim-treesitter-textobjects copied to clipboard
Register key mappings to which-key
Fixes #232
@danielo515 are you using https://github.com/folke/which-key.nvim ? This should set description for this plugin. How can I register for telescope's which_key? Do want to additionally want to overwrite the automatically generated descriptions?
I don't think there is a generic way to set a description for a key mapping. ~~@folke maybe it would be an idea to add a "description" key to opts
of nvim_buf_add_keymap
that can be retrieved by new API function? It is difficult for third party plugins to annotate their keybindings that is not taylored to one specific which-key plugin ~~ (nvim_buf_add_keymap
already has desc
)
The description is inaccurate in a way that we only set the bindings dynamically when tree-sitter is enabled for the buffer. The which-key hints will however appear for all buffers. Not just the ones for which the keybindings were enabled
Ohh! nvim_buf_set_keymap
already has a desc
key!
Ohh!
nvim_buf_set_keymap
already has adesc
key!
Yes, that is the option I was referring to
Can you test now?
Config like this
@kyazdani42 good to go?