summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-05-05 12:34:21 -0500
committerCase Duckworth2021-05-05 12:34:21 -0500
commitd59ff1f811cba8201ed791102c83e317fe56c1d6 (patch)
treea84552f531188a9f7a6aaa3a0f9c942c79b40a92
parentDon't enable a mode just to disable it later (diff)
downloademacs-d59ff1f811cba8201ed791102c83e317fe56c1d6.tar.gz
emacs-d59ff1f811cba8201ed791102c83e317fe56c1d6.zip
Remove complicated which-key delay
-rw-r--r--init.el15
1 files changed, 2 insertions, 13 deletions
diff --git a/init.el b/init.el index f512593..da6623c 100644 --- a/init.el +++ b/init.el
@@ -1042,19 +1042,8 @@ if ripgrep is installed, otherwise `consult-grep'."
1042(setup (:straight which-key) 1042(setup (:straight which-key)
1043 (:option which-key-show-early-on-C-h t 1043 (:option which-key-show-early-on-C-h t
1044 which-key-idle-delay 1 1044 which-key-idle-delay 1
1045 which-key-idle-secondary-delay 0.5 1045 which-key-idle-secondary-delay 0.5)
1046 which-key-delay-functions '(acdw/which-key-delay-all-but)) 1046
1047
1048 (defun acdw/which-key-delay-all-but (seq len)
1049 "Delay all `which-key' popups, /except/ the ones here."
1050 (cond
1051 ;; With C-z binds (`acdw/leader'), pop up right away
1052 ((string-prefix-p "C-z" seq :ignore-case) 0)
1053 ;; Also pop up right away if we're already entering keys
1054 ((> len 1) which-key-idle-secondary-delay)
1055 ;; Otherwise, wait
1056 (t which-key-idle-delay)))
1057
1058 (which-key-setup-side-window-right-bottom) 1047 (which-key-setup-side-window-right-bottom)
1059 (which-key-mode +1)) 1048 (which-key-mode +1))
1060 1049