An API to hide the which-key popup window and remove a spec would be useful #1061
NickJAllen
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, there is an API to add keybindings and show the which-key popup as well as an API to add spec to be shown. I would like a way to be able to also hide it (and potentially remove a spec) programatically too. The reason for this is that a plugin I'm developing has a TUI and based on where the focus is there are different actions that can take place. I would like to use which-key as a general help for the plugin and mapped the '?' key to programatically show the which key help for my TUI buffer. It adds specs to which key automatically and uses desc function to make sure the correct description is shown based on the focus. I would like the ? key to show this help to also be used to close the which-key popup as well. So it acts more like a toggle. I'm also using the cond function of the spec to decide if the action is still relevant instead of removing the spec as there is no API to do that AFAICS. But I think having a hide and remove to match the show and add API functions would make sense. Or is there a reason why this would not be a good idea?
Beta Was this translation helpful? Give feedback.
All reactions