VSpaceCode / vscode-which-key

which-key like menu for Visual Studio Code
https://vspacecode.github.io/docs/whichkey
MIT License
174 stars 18 forks source link

Space keybind with vscode-neovim and the Commands option #77

Closed blasco closed 5 months ago

blasco commented 1 year ago

First of all, thank you for such a amazing extension. I'm too used to vim and spacemacs and this has made it possible for me to take advantage of vscode extensions while keeping my existing workflows.

I'm using neovim-vscode for neovim integration instead of the vscode-vim extension emulation. It's working great, but the only problem that I'm facing is that after I do to show whichkey, running space again to select the "Commands" option, re opens which key

This is my current keybind:

  {
    "key": "space",
    "command": "whichkey.show",
    "when": "neovim.mode != insert"
  },

I think I would need something like this:

  {
    "key": "space",
    "command": "whichkey.show",
    "when": "neovim.mode != insert && whichkey.mode != showing"
  },

So basically something like whichkey.mode or some kind of way to detect that the whick-key menu is already being shown. Is there a better way to configure it? Probably I'm missing something. Thank you once again!

blasco commented 1 year ago

Ok, I found it in the documentation :)

  {
    "key": "space",
    "command": "whichkey.show",
    "when": "neovim.mode != insert && !whichkeyVisible"
  },
blasco commented 1 year ago

Just in case somebody runs in a similar config as my self, here an improved version:

  {
    "key": "space",
    "command": "whichkey.show",
    "when": "neovim.mode == normal && !whichkeyVisible && !inCommandsPicker"
  },
blasco commented 1 year ago

It's actually more difficutl than that, there are too many context that require writting spaces (like extension search, or the terminal for example). How is the ideal way to handle this?

stevenguh commented 1 year ago

Sorry I didn't see that you reopened this:

Have you tried https://github.com/VSpaceCode/VSpaceCode/issues/34#issuecomment-673235610

kola-web commented 6 months ago

Okay, it works pretty well