diff --git a/modules/completion/vertico/autoload/vertico.el b/modules/completion/vertico/autoload/vertico.el index d968a6fd9..55024b7a8 100644 --- a/modules/completion/vertico/autoload/vertico.el +++ b/modules/completion/vertico/autoload/vertico.el @@ -218,3 +218,22 @@ If INITIAL is non-nil, use as initial input." (setq buffers nil) (with-current-buffer (switch-to-buffer (marker-buffer mark)) (goto-char (marker-position mark))))) + +;;;###autoload +(defun +vertico/embark-which-key-indicator () + "An embark indicator that displays keymaps using which-key. +The which-key help message will show the type and value of the +current target followed by an ellipsis if there are further +targets." + (lambda (&optional keymap targets prefix) + (if (null keymap) + (kill-buffer which-key--buffer) + (which-key--show-keymap + (if (eq (caar targets) 'embark-become) + "Become" + (format "Act on %s '%s'%s" + (caar targets) + (embark--truncate-target (cdar targets)) + (if (cdr targets) "…" ""))) + (if prefix (lookup-key keymap prefix) keymap) + nil nil t)))) diff --git a/modules/completion/vertico/config.el b/modules/completion/vertico/config.el index bd31446ac..33d5f8192 100644 --- a/modules/completion/vertico/config.el +++ b/modules/completion/vertico/config.el @@ -140,11 +140,7 @@ overrides `completion-styles' during company completion sessions.") :config (set-popup-rule! "^\\*Embark Export Grep" :size 0.35 :ttl 0 :quit nil) - (setq embark-action-indicator - (lambda (map _target) - (which-key--show-keymap "Embark" map nil nil 'no-paging) - #'which-key--hide-popup-ignore-command) - embark-become-indicator embark-action-indicator) + (setq embark-indicator #'+vertico/embark-which-key-indicator) ;; add the package! target finder before the file target finder, ;; so we don't get a false positive match. (let ((pos (or (cl-position diff --git a/modules/completion/vertico/packages.el b/modules/completion/vertico/packages.el index 5f30427f9..6db93bb1a 100644 --- a/modules/completion/vertico/packages.el +++ b/modules/completion/vertico/packages.el @@ -4,22 +4,22 @@ (package! vertico :recipe (:host github :repo "minad/vertico" :files ("*.el" "extensions/*.el")) - :pin "4a9029714e847832d3ecb3ae74a7049306924f2e") + :pin "9de6709cddc09740d23d24fb425fa3c174d0e956") (package! orderless :pin "1e84120a28525ccb47b602fc19b7afbeffbbe502") -(package! consult :pin "28f9ba8bdfdb13257862a658715b6ceb96f4951e") +(package! consult :pin "69bbd213dc8a98abe94a4f5b1920e3d689d31caa") (when (featurep! :checkers syntax) (package! consult-flycheck :pin "92b259e6a8ebe6439f67d3d7ffa44b7e64b76478")) -(package! embark :pin "be03ce9ce1630b32e29cc50118d058c05696cb35") -(package! embark-consult :pin "be03ce9ce1630b32e29cc50118d058c05696cb35") +(package! embark :pin "1a7e6b556142216fa5f9b897bd5eca73968f3c49") +(package! embark-consult :pin "1a7e6b556142216fa5f9b897bd5eca73968f3c49") -(package! marginalia :pin "a3a8edbf25db4b1e167f1fdff6f60a065d0bf9cb") +(package! marginalia :pin "11235445365c6ab119acabe91828e9182097ece7") (package! wgrep :pin "f9687c28bbc2e84f87a479b6ce04407bb97cfb23") (when (featurep! +icons) (package! all-the-icons-completion :recipe (:host github :repo "iyefrat/all-the-icons-completion") - :pin "24cdb3b42c6ca0a8926ad6958c76d7928fc559ce")) + :pin "d1d4b2f0dfbfa94d33fe50e8089c06601adfe674"))