about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2021-07-08 16:29:38 +0100
committerDavid Morgan <djm_uk@protonmail.com>2021-07-08 16:29:38 +0100
commitf06372b0c5db56a547972238aef203ddc6b8b4c6 (patch)
tree4cf44afea6c0eb92ee009780365db2ca225e77c0
parented618f8019ee0441259aa62ea87bc71d39bc1f11 (diff)
downloaddotfiles-f06372b0c5db56a547972238aef203ddc6b8b4c6.tar.gz
Update config for vertico/consult some more
-rw-r--r--emacs-prelude/personal/lisp/init-completion.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/emacs-prelude/personal/lisp/init-completion.el b/emacs-prelude/personal/lisp/init-completion.el
index 4534ee0..08e2cba 100644
--- a/emacs-prelude/personal/lisp/init-completion.el
+++ b/emacs-prelude/personal/lisp/init-completion.el
@@ -5,11 +5,6 @@
   (setq tab-always-indent 'complete)
 
   ;; for vertico
-  ;; Add prompt indicator to `completing-read-multiple'.
-  (defun crm-indicator (args)
-    (cons (concat "[CRM] " (car args)) (cdr args)))
-  (advice-add #'completing-read-multiple :filter-args #'crm-indicator)
-  ;; Do not allow the cursor in the minibuffer prompt
   (setq minibuffer-prompt-properties
         '(read-only t cursor-intangible t face minibuffer-prompt))
   (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)
@@ -161,6 +156,9 @@
   ;; This adds thin lines, sorting and hides the mode line of the window.
   (advice-add #'register-preview :override #'consult-register-window)
 
+  ;; Optionally replace `completing-read-multiple' with an enhanced version.
+  (advice-add #'completing-read-multiple :override #'consult-completing-read-multiple)
+
   ;; Use Consult to select xref locations with preview
   (setq xref-show-xrefs-function #'consult-xref
         xref-show-definitions-function #'consult-xref)