diff options
author | jao <jao@gnu.org> | 2021-11-12 04:10:40 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-11-12 04:10:40 +0000 |
commit | ecb72ed0c411b453b8a6b5a2b1fa3af05ac43a0d (patch) | |
tree | 8274fa375cb9fa6d052dd32628f36fcba804b977 | |
parent | 9fcd6c3ea32da1a62ab402a9f37e1294d143a08d (diff) | |
download | elibs-ecb72ed0c411b453b8a6b5a2b1fa3af05ac43a0d.tar.gz elibs-ecb72ed0c411b453b8a6b5a2b1fa3af05ac43a0d.tar.bz2 |
vertico extensions (mct is charming, but vertico's too good)
-rw-r--r-- | completion.org | 55 |
1 files changed, 39 insertions, 16 deletions
diff --git a/completion.org b/completion.org index e00b1d0..3c552ef 100644 --- a/completion.org +++ b/completion.org @@ -31,10 +31,9 @@ corfu-echo-documentation 0.25 corfu-cycle t corfu-count 15 - corfu-quit-no-match t ; setting this to nil - corfu-auto t ; and this to nil is another option - corfu-commit-predicate nil ; when nil, we set: - orderless-component-separator "[-/]+" ; no space (it aborts) + corfu-quit-no-match t + corfu-auto t + corfu-commit-predicate nil corfu-min-width 20 corfu-max-width 100) :config @@ -52,18 +51,22 @@ (jao-corfu-no-auto eshell) (add-to-list 'corfu-excluded-modes 'notmuch-message-mode) - :bind (:map corfu-map - ([remap next-line] . nil) - ([remap previous-line] . nil) - ([tab] . corfu-next) - ("M-n" . corfu-next) - ("M-p" . corfu-previous))) + :bind (:map corfu-map ("C-<return>" . newline))) (corfu-global-mode 1) #+end_src * vertico #+begin_src emacs-lisp + (jao-load-path "vertico/extensions") + (use-package vertico-directory + :after vertico) + + (use-package vertico-repeat + :after vertico + :config (add-hook 'minibuffer-setup-hook #'vertico-repeat-save) + :bind (("M-R" . vertico-repeat))) + (use-package vertico :ensure t :init @@ -71,14 +74,34 @@ vertico-cycle t vertico-group-format nil org-refile-use-outline-path t) - (vertico-mode 1) - :bind (:map vertico-map (("TAB" . #'vertico-next) - ("<backtab>" . #'vertico-previous) - ("C-SPC" . #'vertico-insert)))) + :config + (setq read-extended-command-predicate + #'command-completion-default-include-p) - (setq read-extended-command-predicate - #'command-completion-default-include-p) + :bind (:map vertico-map (("RET" . vertico-directory-enter) + ("M-<backspace>" . vertico-directory-delete-word) + ("<backspace>" . vertico-directory-delete-char)))) + (vertico-mode 1) + #+end_src +* mct + #+begin_src emacs-lisp + (use-package mct + :ensure t + :init + (setq mct-remove-shadowed-file-names t + mct-hide-completion-mode-line t + mct-show-completion-line-numbers nil + mct-apply-completion-stripes nil + mct-minimum-input 3 + mct-live-update-delay 0.6 + mct-completion-passlist '(consult-buffer + imenu + Info-goto-node + Info-index + Info-menu + vc-retrieve-tag))) + ;; (mct-mode 1) #+end_src * marginalia #+begin_src emacs-lisp |