Make which-key descriptions respect the users leader key.

This commit is contained in:
person808 2015-07-26 21:26:50 -10:00 committed by syl20bnr
parent 0f979d3cea
commit 2e48e5568a
1 changed files with 4 additions and 3 deletions

View File

@ -3449,9 +3449,10 @@ one of `l' or `r'."
;; ensure the target matches the whole string
(push (cons (concat "\\`" (car nd) "\\'") (cdr nd))
which-key-description-replacement-alist)))
(which-key-add-key-based-replacements
"SPC m" "maj mode cmds"
(concat "SPC " dotspacemacs-command-key) "M-x")
(dolist (leader-key `(,dotspacemacs-leader-key ,dotspacemacs-emacs-leader-key))
(which-key-add-key-based-replacements
(concat leader-key " m") "maj mode cmds"
(concat leader-key " " dotspacemacs-command-key) "M-x"))
;; disable special key handling for spacemacs, since it can be
;; disorienting if you don't understand it
(setq which-key-special-keys nil)