From b5e070b137fd61cc66278635a3da0b31e6c4ebea Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 11 Aug 2021 22:06:11 -0500 Subject: Add vertico crm integration I still don't know what crm is.... --- init.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index 9aa18a4..79fb0ff 100644 --- a/init.el +++ b/init.el @@ -995,7 +995,16 @@ if ripgrep is installed, otherwise `consult-grep'." (defun crm-indicator (args) (cons (concat "[CRM] " (car args)) (cdr args))) (:advise completing-read-multiple - :filter-args #'crm-indicator))) + :filter-args #'crm-indicator)) + + (with-eval-after-load 'vertico + (with-eval-after-load 'consult + (define-key consult-crm-map "\r" #'+vertico-crm-exit) + (define-key consult-crm-map "\t" #'vertico-exit) + (defun +vertico-crm-exit () + (interactive) + (run-at-time 0 nil #'vertico-exit) + (funcall #'vertico-exit))))) (setup (:straight crux) -- cgit 1.4.1-21-gabe81