which-key labels not shown in prefix-command keymaps
Closed this issue · 1 comments
Deleted user commented
Hello,
I am using the following configuration (inspired by Spacemacs):
(general-define-key
:states 'normal
"SPC" '(:prefix-command my/space-menu-map :wk "S P A C E menu")
)
(general-define-key
:keymaps 'my/space-menu-map
"b" '(:prefix-command my/buffer-menu-map :wk "Buffer…")
"f" '(:prefix-command my/file-menu-map :wk "File…")
"h" '(:prefix-command my/help-menu-map :wk "Help…")
)
(general-define-key
:keymaps 'my/file-menu-map
"s" '(save-buffer :wk "save")
)
This works fine, except that the which-key labels are not shown (I just see the keymap or command name). Which-key does work outside of :prefix-command
keymaps.
noctuid commented
Use keymap-based replacements instead of :wk
.
For the prefix commands, you might be able to just replace :wk
with :prefix-name
. If not, you will have to bind to a cons (e.g. (cons "Buffer…" 'my/buffer-menu-map)
.
#503 should be updated (or a new PR added) to improve the documentation for which key.