From 2d3e66de187e1b145f8b980d7ccb4d2b38de2628 Mon Sep 17 00:00:00 2001
From: Case Duckworth
Date: Mon, 9 Aug 2021 23:14:25 -0500
Subject: Add vertico extensions

---
 init.el | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/init.el b/init.el
index 4b493eb..a564ac7 100644
--- a/init.el
+++ b/init.el
@@ -1316,13 +1316,31 @@ if ripgrep is installed, otherwise `consult-grep'."
 
 (setup (:straight (vertico
                    :host github
-                   :repo "minad/vertico"))
+                   :repo "minad/vertico"
+                   :files ("*" "extensions/*"
+                           (:exclude ".git"))))
+
   (:option resize-mini-windows 'grow-only
            vertico-count-format nil
            vertico-cycle t)
+
   (if (boundp 'comp-deferred-compilation-deny-list)
       (add-to-list 'comp-deferred-compilation-deny-list "vertico"))
-  (vertico-mode +1))
+
+  (vertico-mode +1)
+
+  ;; Extensions!
+  (:also-load vertico-mouse)
+  (vertico-mouse-mode +1)
+
+  ;; Workarounds!
+  (when (version< org-version "9.5")
+    (defun disable-selection ()
+      (when (eq minibuffer-completion-table #'org-tags-completion-function)
+        (setq-local vertico-map minibuffer-local-completion-map
+                    completion-cycle-threshold nil
+                    completion-styles '(basic))))
+    (advice-add #'vertico--setup :before #'disable-selection)))
 
 (setup (:straight vuiet)
   (:needs "youtube-dl"
-- 
cgit 1.4.1-21-gabe81