1

My current config looks like this:

(use-package general
    :ensure t
    :config (general-define-key
    :states '(normal visual insert emacs)
    :prefix "SPC"
    :non-normal-prefix "C-SPC"

    ;; Buffer.
    "b k" '(kill-this-buffer :which-key "Kill Buffer")
))

But when I press SPC it shows +prefix next to b instead of an actual name. How can I set a name there with :which-key?

1

You can give SPC and SPC-b a description for which-key by using the :ignore keyword:

(general-define-key
 :states '(normal visual insert emacs)
 :keymaps 'override
 :prefix "SPC"
 :non-normal-prefix "C-SPC"
 "" '(:ignore t :which-key "description for SPC") ; <<< added
 ;; Buffer.
 "b" '(:ignore t :which-key "description for b") ; <<< added
 "b k" '(kill-this-buffer :which-key "Kill Buffer"))

enter image description here

This is shown in the example in the Which Key Integration section on the github page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.