zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
40.92k stars 2.13k forks source link

Which-Key like menu #10910

Open DissolveDZ opened 2 months ago

DissolveDZ commented 2 months ago

Check for existing issues

Describe the feature

Many vim distros like LazyVim or NvChad and Doom Emacs or even Helix have a Which-Key popup for extra keybinds. It's extremely useful and you could even have an optional delay so you can complete the combination before it opens, you have a visual UI which tell you which key you can press to open which many for example you press W and then V to go to window settings and split it vertically. I'm currently using Zed as my main text editor and would love to have this feature as it helps a lot and makes it feel really like a Vim alternative.

This could become a crucial part of the Vim workflow and could be really essential to the Zed experience. Many editors have it as a plugin although some have it built-in, once Zed gets plugin support it might even be implemented through a plugin but I like the native way more

If applicable, add mockups / screenshots to help present your vision of the feature

These images aren't mine, I just found them on Google but I've tried all of these implementations of which-key. This might just seem like the command line when pressing : in Zed but it's very different when actually using

Doom Emacs: image

NvChad: image

Helix: image

JosephTLyons commented 2 months ago

This would be useful outside of Vim mode as well, with just the standard bindings, which was suggested here:

robclancy commented 1 month ago

Yep for me if this had better vim multi cursor (I think I just need to rebind things to get the editors version to work, ctrl+d is being overridden by vim right now), bindings like in doom emacs with whichkey and probably less account/copilot stuff I'd use it as my main editor when not using PHP.

theherk commented 1 month ago

Screenshot 2024-05-16 at 12 34 31

Just wanted to add a screenshot of a Neovim mini.nvim mini.clue implementation, which is somewhere between Helix's implementation and which-key. This is just for ideation.

jellydn commented 23 hours ago

Just a thought, we could have a plugin similar to https://github.com/VSpaceCode/vscode-which-key if Zed could expose APIs.