diff options
author | David Morgan <djm_uk@protonmail.com> | 2021-10-12 06:38:27 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2021-10-12 06:38:27 +0100 |
commit | 57b36ca772f8f3a03345af1def4f78dd5c21d629 (patch) | |
tree | 5ffafab0af28b948fb958ed50cc52caa33d349ff | |
parent | 963a322166d5865a25a9e11acefde988c7519e68 (diff) | |
download | dotfiles-57b36ca772f8f3a03345af1def4f78dd5c21d629.tar.gz |
Ensure vertico directory commands are loaded
-rw-r--r-- | .emacs.d/lisp/init-minibuffer.el | 28 |
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)) |