tweak wich-key configuration
This commit is contained in:
parent
632641b99e
commit
f4e5e4cbe6
2 changed files with 14 additions and 18 deletions
|
@ -1,19 +1,21 @@
|
|||
(setq which-key-packages '(which-key))
|
||||
|
||||
(setq which-key-excluded-packages '(guide-key
|
||||
guide-key-tip))
|
||||
|
||||
(defun which-key/init-which-key ()
|
||||
(use-package which-key
|
||||
:defer t
|
||||
:config
|
||||
:init
|
||||
(progn
|
||||
(defun spacemacs/toggle-which-key ()
|
||||
"Toggle which-key-mode on and off."
|
||||
(interactive)
|
||||
(if (symbol-value which-key-mode)
|
||||
(which-key-mode -1)
|
||||
(which-key-mode)))
|
||||
|
||||
(setq which-key-max-description-length 32)
|
||||
(which-key-mode)
|
||||
(spacemacs|add-toggle which-key
|
||||
:status which-key-mode
|
||||
:on (which-key-mode)
|
||||
:off (which-key-mode -1)
|
||||
:documentation
|
||||
"Display a buffer with available key bindings."
|
||||
:evil-leader "tK")
|
||||
(defadvice which-key--update
|
||||
(around spacemacs/inhibit-which-key-buffer activate)
|
||||
"Prevent the popup of the which-key buffer in some case."
|
||||
|
@ -24,14 +26,6 @@
|
|||
bzg-big-fringe-mode)
|
||||
(let ((which-key-inhibit t)) ad-do-it)
|
||||
ad-do-it))
|
||||
|
||||
(spacemacs|add-toggle which-key
|
||||
:status which-key-mode
|
||||
:on (which-key-mode)
|
||||
:off (which-key-mode -1)
|
||||
:documentation
|
||||
"Display a buffer with available key bindings."
|
||||
:evil-leader "tW")
|
||||
(add-to-list 'which-key-description-replacement-alist '("select-window-\\([0-9]\\)" . "Window \\1"))
|
||||
(which-key-add-key-based-replacements
|
||||
"SPC TAB" "last buffer"
|
||||
|
@ -46,4 +40,5 @@
|
|||
"SPC v" "expand region"
|
||||
"SPC <f1>" "apropos"
|
||||
"SPC m" "maj mode cmds"
|
||||
(concat "SPC " dotspacemacs-command-key) "M-x"))))
|
||||
(concat "SPC " dotspacemacs-command-key) "M-x")
|
||||
(spacemacs|diminish which-key-mode " Ⓚ" " K"))))
|
||||
|
|
|
@ -1261,6 +1261,7 @@ Example: (evil-map visual \"<\" \"<gv\")"
|
|||
'spacemacs/no-golden-ratio-guide-key)
|
||||
(add-to-list 'golden-ratio-exclude-buffer-names " *NeoTree*")
|
||||
(add-to-list 'golden-ratio-exclude-buffer-names "*LV*")
|
||||
(add-to-list 'golden-ratio-exclude-buffer-names " *which-key*")
|
||||
|
||||
(spacemacs|diminish golden-ratio-mode " ⓖ" " g"))))
|
||||
|
||||
|
|
Reference in a new issue