about summary refs log tree commit diff stats
path: root/.emacs.d/lisp/init-minibuffer.el
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2021-10-12 06:38:27 +0100
committerDavid Morgan <djm_uk@protonmail.com>2021-10-12 06:38:27 +0100
commit57b36ca772f8f3a03345af1def4f78dd5c21d629 (patch)
tree5ffafab0af28b948fb958ed50cc52caa33d349ff /.emacs.d/lisp/init-minibuffer.el
parent963a322166d5865a25a9e11acefde988c7519e68 (diff)
downloaddotfiles-57b36ca772f8f3a03345af1def4f78dd5c21d629.tar.gz
Ensure vertico directory commands are loaded
Diffstat (limited to '.emacs.d/lisp/init-minibuffer.el')
-rw-r--r--.emacs.d/lisp/init-minibuffer.el28
1 files changed, 14 insertions, 14 deletions
diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el
index 57f617c..fa9e60f 100644
--- a/.emacs.d/lisp/init-minibuffer.el
+++ b/.emacs.d/lisp/init-minibuffer.el
@@ -85,6 +85,19 @@ DEFS is a plist associating completion categories to commands."
     (if switching-project
         (vertico-exit)
       (vertico-directory-enter)))
+  (defun vertico-directory-slash ()
+    (interactive)
+    (if (and (>= vertico--index 0)
+             (string-suffix-p "/" (vertico--candidate))
+             (vertico-directory--completing-file-p))
+        (vertico-insert)
+      (insert "/")))
+  (defun vertico-directory-home ()
+    (interactive)
+    (if (and (string-suffix-p "/" (vertico--candidate))
+             (vertico-directory--completing-file-p))
+        (insert "~/")
+      (insert "~")))
   (defun read-project (orig &rest args)
     (let ((switching-project t))
       (apply orig args)))
@@ -105,21 +118,8 @@ DEFS is a plist associating completion categories to commands."
     'file #'vertico-directory-delete-word
     'project-file #'vertico-directory-delete-word)
   :config
-  (defun vertico-directory-slash ()
-    (interactive)
-    (if (and (>= vertico--index 0)
-             (string-suffix-p "/" (vertico--candidate))
-             (vertico-directory--completing-file-p))
-        (vertico-insert)
-      (insert "/")))
-  (defun vertico-directory-home ()
-    (interactive)
-    (if (and (string-suffix-p "/" (vertico--candidate))
-             (vertico-directory--completing-file-p))
-        (insert "~/")
-      (insert "~")))
   :load-path vertico-extensions-dir
-  :commands vertico-directory-enter
+  :commands (vertico-directory-enter vertico-directory-delete-word vertico-directory-delete-char)
   ;; Tidy shadowed file names
   :hook (rfn-eshadow-update-overlay . vertico-directory-tidy))