Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

which-key labels not shown in prefix-command keymaps #505

Closed
ghost opened this issue Sep 4, 2022 · 1 comment
Closed

which-key labels not shown in prefix-command keymaps #505

ghost opened this issue Sep 4, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 4, 2022

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
Copy link
Owner

noctuid commented Sep 8, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant