diff options
-rw-r--r-- | init.el | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/init.el b/init.el index 8b9a086..0a82bfd 100644 --- a/init.el +++ b/init.el | |||
@@ -982,9 +982,21 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
982 | 982 | ||
983 | (setup (:straight which-key) | 983 | (setup (:straight which-key) |
984 | (:option which-key-show-early-on-C-h t | 984 | (:option which-key-show-early-on-C-h t |
985 | which-key-idle-delay 10000 | 985 | which-key-idle-delay 0.05 |
986 | which-key-idle-secondary-delay 0.05) | 986 | which-key-idle-secondary-delay 0.05 |
987 | (which-key-setup-side-window-bottom) | 987 | which-key-delay-functions '(acdw/which-key-delay-all-but)) |
988 | |||
989 | (defun acdw/which-key-delay-all-but (seq len) | ||
990 | "Delay all `which-key' popups, /except/ the ones here." | ||
991 | (cond | ||
992 | ;; With C-z binds (`acdw/leader'), pop up right away | ||
993 | ((string-prefix-p "C-z" seq :ignore-case) 0) | ||
994 | ;; Also pop up right away if we're already entering keys | ||
995 | ((> len 1) 0) | ||
996 | ;; Otherwise, wait 1.25 seconds | ||
997 | (t 1.25))) | ||
998 | |||
999 | (which-key-setup-minibuffer) | ||
988 | (which-key-mode +1)) | 1000 | (which-key-mode +1)) |
989 | 1001 | ||
990 | (setup (:straight zzz-to-char) | 1002 | (setup (:straight zzz-to-char) |