summary refs log tree commit diff
path: root/config.org
diff options
context:
space:
mode:
authornoa@gaiwan.org2024-06-23 15:28:22 +0000
committernoa@gaiwan.org2024-06-23 15:28:22 +0000
commit90f014dcdb579ba98a351b716c15f2eb1df6501a (patch)
treea039f2e2326abba4bc26c83d1debcf888f7207e1 /config.org
parente22b23b2a859e0932c5657a9ee37fecc5f6389fe (diff)
Update loading vertico
Diffstat (limited to 'config.org')
-rw-r--r--config.org9
1 files changed, 5 insertions, 4 deletions
diff --git a/config.org b/config.org
index 216d3b6..59e16a8 100644
--- a/config.org
+++ b/config.org
@@ -117,7 +117,7 @@ Vertico is a package for a nice minibuffer completion experience.  It displays a
   (package-ensure '(vertico
 		    :url "https://github.com/minad/vertico.git"
 		    :lisp-dir "extensions/"))
-  (require 'vertico)
+  (package-activate 'vertico)
   (setopt vertico-mode t)
 #+end_src
 
@@ -149,9 +149,10 @@ And of course, i want to be able to interact with vertico with the mouse.
 When completing a filename, i want to be able to easily delete directories in one fell swoop, instead of character by character or word by word.  Usually C-<backspace> would be fine, but if directories have a hyphen or space in their name, i have to press multiple times, which is almost never desirable.
 
 #+begin_src elisp
-(bind-key (kbd "RET") #'vertico-directory-enter 'vertico-map)
-(bind-key (kbd "<backspace>") #'vertico-directory-delete-char 'vertico-map)
-(bind-key (kbd "<C-<backspace>") #'vertico-directory-delete-word 'vertico-map)
+  (with-eval-after-load 'vertico
+    (bind-key (kbd "RET") #'vertico-directory-enter 'vertico-map)
+    (bind-key (kbd "<backspace>") #'vertico-directory-delete-char 'vertico-map)
+    (bind-key (kbd "<C-<backspace>") #'vertico-directory-delete-word 'vertico-map))
 #+end_src
 
 If i type ~/ etc in a find-file prompt, get rid of the preceding directory names for a cleaner look.