justbur / emacs-which-key

Emacs package that displays available keybindings in popup
GNU General Public License v3.0
1.74k stars 87 forks source link

Try to extract common prefix for "+prefix" keymaps. #293

Open a13 opened 3 years ago

a13 commented 3 years ago

If a prefix keymap contains only commands (including nested ones) with the same prefix (say, "projectile-"), optionally show it (possibly with a custom suffix) instead of "+prefix"

justbur commented 3 years ago

You can name prefixes with the replacement options.

a13 commented 3 years ago

You can name prefixes with the replacement options.

sure, but as I can see, you have to do it manually for every prefix, or you don't?

justbur commented 3 years ago

sure, but as I can see, you have to do it manually for every prefix, or you don't?

yes that's correct. I think it would be more sensible to do this at the time the keys are bound, rather than dynamically through which-key.