Remove complicated which-key delay
This commit is contained in:
parent
47304ba506
commit
d59ff1f811
13
init.el
13
init.el
|
@ -1042,19 +1042,8 @@ if ripgrep is installed, otherwise `consult-grep'."
|
|||
(setup (:straight which-key)
|
||||
(:option which-key-show-early-on-C-h t
|
||||
which-key-idle-delay 1
|
||||
which-key-idle-secondary-delay 0.5
|
||||
which-key-delay-functions '(acdw/which-key-delay-all-but))
|
||||
which-key-idle-secondary-delay 0.5)
|
||||
|
||||
(defun acdw/which-key-delay-all-but (seq len)
|
||||
"Delay all `which-key' popups, /except/ the ones here."
|
||||
(cond
|
||||
;; With C-z binds (`acdw/leader'), pop up right away
|
||||
((string-prefix-p "C-z" seq :ignore-case) 0)
|
||||
;; Also pop up right away if we're already entering keys
|
||||
((> len 1) which-key-idle-secondary-delay)
|
||||
;; Otherwise, wait
|
||||
(t which-key-idle-delay)))
|
||||
|
||||
(which-key-setup-side-window-right-bottom)
|
||||
(which-key-mode +1))
|
||||
|
||||
|
|
Loading…
Reference in New Issue