feat(vertico): colorize vertico candidate on act
This commit is contained in:
parent
c10d277713
commit
26014435b2
2 changed files with 12 additions and 0 deletions
|
@ -289,3 +289,14 @@ targets."
|
||||||
(default-directory (cdr prompt-dir)))
|
(default-directory (cdr prompt-dir)))
|
||||||
(find-file (consult--find (car prompt-dir) #'+vertico--consult--fd-builder initial)))
|
(find-file (consult--find (car prompt-dir) #'+vertico--consult--fd-builder initial)))
|
||||||
(consult-find dir initial)))
|
(consult-find dir initial)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +vertico-embark-vertico-indicator ()
|
||||||
|
"An embark indicator that colorizes the vertico candidate differently on act"
|
||||||
|
(let ((fr face-remapping-alist))
|
||||||
|
(lambda (&optional keymap _targets prefix)
|
||||||
|
(when (bound-and-true-p vertico--input)
|
||||||
|
(setq-local face-remapping-alist
|
||||||
|
(if keymap
|
||||||
|
(cons '(vertico-current . embark-target) fr)
|
||||||
|
fr))))))
|
||||||
|
|
|
@ -147,6 +147,7 @@ overrides `completion-styles' during company completion sessions.")
|
||||||
:config
|
:config
|
||||||
(set-popup-rule! "^\\*Embark Export Grep" :size 0.35 :ttl 0 :quit nil)
|
(set-popup-rule! "^\\*Embark Export Grep" :size 0.35 :ttl 0 :quit nil)
|
||||||
(cl-nsubstitute #'+vertico/embark-which-key-indicator #'embark-mixed-indicator embark-indicators)
|
(cl-nsubstitute #'+vertico/embark-which-key-indicator #'embark-mixed-indicator embark-indicators)
|
||||||
|
(add-to-list 'embark-indicators #'+vertico-embark-vertico-indicator)
|
||||||
;; add the package! target finder before the file target finder,
|
;; add the package! target finder before the file target finder,
|
||||||
;; so we don't get a false positive match.
|
;; so we don't get a false positive match.
|
||||||
(let ((pos (or (cl-position
|
(let ((pos (or (cl-position
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue