From ecb72ed0c411b453b8a6b5a2b1fa3af05ac43a0d Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 12 Nov 2021 04:10:40 +0000 Subject: vertico extensions (mct is charming, but vertico's too good) --- completion.org | 55 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 16 deletions(-) (limited to 'completion.org') 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-" . 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) - ("" . #'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-" . vertico-directory-delete-word) + ("" . 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 -- cgit v1.2.3