This commit is contained in:
StrawberryTea 2025-12-05 22:57:20 +01:00 committed by GitHub
commit 4d7146f0bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -263,8 +263,23 @@ orderless."
(use-package! embark
:defer t
:init
(setq which-key-use-C-h-commands nil
;; Allow C-h to open Consult when calling which-key without a prefix.
(setq which-key-use-C-h-commands t
prefix-help-command #'embark-prefix-help-command)
(defvar +vertico-which-key-current-keymap nil
"The current keymap being displayed by which-key.")
(defadvice! +vertico-which-key-update-current-keymap-a (_keymap-name keymap &rest args)
:before #'which-key--show-keymap
(setq +vertico-which-key-current-keymap keymap))
(defadvice! +vertico-which-key-consult-C-h-dispatch (oldfun)
:around #'which-key-C-h-dispatch
(setq this-command 'embark-prefix-help-command)
(cond ((not (which-key--popup-showing-p))
(call-interactively #'embark-prefix-help-command))
((string-empty-p (which-key--current-key-string))
(embark-bindings-in-keymap +vertico-which-key-current-keymap))
(t (call-interactively #'embark-prefix-help-command))))
(map! [remap describe-bindings] #'embark-bindings
"C-;" #'embark-act ; to be moved to :config default if accepted
(:map minibuffer-local-map