diff options
author | David Morgan <djm_uk@protonmail.com> | 2021-08-19 14:16:58 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2021-08-19 14:16:58 +0100 |
commit | 37c7bb35638e841f5780a9360c81a4e7a994458b (patch) | |
tree | 2668d5397fe8bed7d7103eb021ac71f6a92705ba /.emacs.d | |
parent | a8809652e5aa7fab353de7e6833c30b230778d04 (diff) | |
download | dotfiles-37c7bb35638e841f5780a9360c81a4e7a994458b.tar.gz |
Add vertico-directory-slash
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/lisp/init-completion.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/.emacs.d/lisp/init-completion.el b/.emacs.d/lisp/init-completion.el index b034405..5136210 100644 --- a/.emacs.d/lisp/init-completion.el +++ b/.emacs.d/lisp/init-completion.el @@ -157,10 +157,18 @@ ;; See init-packages.el for fetching of Vertico Extenions ;; Required extensions must be in the vertico-extensions var (use-package vertico-directory + :config + (defun vertico-directory-slash () + (interactive) + (if (and (>= vertico--index 0) + (string-suffix-p "/" (vertico--candidate)) + (vertico-directory--completing-file-p)) + (vertico-insert) + (insert "/"))) :load-path vertico-extensions-dir :bind (:map vertico-map ("RET" . vertico-directory-enter) - ;("/" . vertico-directory-enter) + ("/" . vertico-directory-slash) ("DEL" . vertico-directory-delete-char) ("M-DEL" . vertico-directory-delete-word)) ;; Tidy shadowed file names |