You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What would need to happen is, when which-key is displayed, a hook is called that interrupts the displaying, and delegates the rendering. whichkey.show has the ability to feed it items directly, using a json structure. https://vspacecode.github.io/docs/whichkey/#show-directly. I'm thinking all that would be needed is to feed the keys back to neovim to execute the action.
For example, if the user presses g, the following (incomplete) would need to be generated:
commands.executeCommand("whichkey.show",[{"key": "f","name": "Go to file under cursor","type": "command","command": "vscode-neovim.send","args": "f"},{"key": "u","name": "+Lowercase","type": "bindings","bindings": [{"key": "$","name": "End of line","command": "vscode-neovim.send","args": "u$"},]}]);
Do you think this would be possible to implement given the design of which-key? I'm not sure if it can generate the whole tree ahead of time or not.
Alternative idea
If which-key is able to generate a tree containing all possible commands, we could instead call
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, vscode-neovim maintainer here.
It would be super cool if which-key.nvim could work with vscode.
I think this would be possible if https://github.com/VSpaceCode/vscode-which-key is used as a frontend.
What would need to happen is, when which-key is displayed, a hook is called that interrupts the displaying, and delegates the rendering.
whichkey.show
has the ability to feed it items directly, using a json structure. https://vspacecode.github.io/docs/whichkey/#show-directly. I'm thinking all that would be needed is to feed the keys back to neovim to execute the action.For example, if the user presses
g
, the following (incomplete) would need to be generated:Do you think this would be possible to implement given the design of which-key? I'm not sure if it can generate the whole tree ahead of time or not.
Alternative idea
If which-key is able to generate a tree containing all possible commands, we could instead call
and then call
commands.executeCommand("whichkey.show", "Neovim.bindings");
which would be a lot more performant.Let me know if any of these are possible, and what would be the first steps to implement. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions