jonarrien / telescope-cmdline.nvim

Telescope cmdline
MIT License
127 stars 10 forks source link

[Feature] show command key mappings #17

Open sand4rt opened 9 months ago

sand4rt commented 9 months ago

Would it be possible to include a feature that shows the key mappings for individual commands, as in the screenshot? I think this can replace Which Key for the most part:

image

jonarrien commented 8 months ago

I also use whichkey, but I think each plugin serves a different purpose:

It would be nice to show those keymaps like VSC, but I see two main concerns:

As :Telescope keymaps is available, I'm not foreseeing to include this, but open to any suggestion or PR if it's fast enough.

sand4rt commented 8 months ago

Thank you for your reply! Here are my thoughts on your points;

telescope-cmdline: is for typing commands and filtering history quickly, not everything can be mapped to key

Not mapping everything to a key should be ok. This approach is also adopted by VSC (see screenshot).

In order to close the popup after one of those mapping is pressed, telescope-cmdline.nvim should hijack these events

Personally, I'm not inclined to type out the keymap once I've already found them, as I could just press Enter instead and remember the keymap for the next time. (This approach is also adopted by VSC if I remember it correctly)

Searching all keymaps and rendering them may slow down the plugin.

I'm not sure about the impact of this and if there are any ways to keep performance good.

As :Telescope keymaps is available

I've been using that so far. I thought it would be nice to have a single tool/keymap for this.