From f2e62b17a3767c184a3dce0b53d7b3c23ec9477f Mon Sep 17 00:00:00 2001 From: jao Date: Mon, 15 Nov 2021 21:42:21 +0000 Subject: completion: playing with mct --- completion.org | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/completion.org b/completion.org index aa01983..8ef7f67 100644 --- a/completion.org +++ b/completion.org @@ -75,7 +75,7 @@ :init (setq vertico-count 20 vertico-cycle t - vertico-group-format nil + ; vertico-group-format nil org-refile-use-outline-path t) :config (setq read-extended-command-predicate @@ -85,38 +85,35 @@ ("M-" . vertico-directory-delete-word) ("" . vertico-directory-delete-char)))) - (vertico-mode -1) + ;; (vertico-mode 1) #+end_src * mct #+begin_src emacs-lisp + (jao-load-path "mct") (use-package mct :ensure t :init (setq mct-remove-shadowed-file-names t - mct-hide-completion-mode-line nil + mct-hide-completion-mode-line t mct-show-completion-line-numbers nil mct-apply-completion-stripes nil mct-minimum-input 3 - mct-live-completion t - mct-live-update-delay 0.6 - mct-completion-passlist '(consult-rgrep - imenu + mct-live-update-delay 0 + mct-live-completion t ;; 'visible + mct-completion-passlist '(imenu Info-goto-node Info-index Info-menu vc-retrieve-tag)) - :config - (defun jao-mct-complete-and-go () - "Complete current input, as with `M-e' and accept the candidate." - (interactive) - (mct-edit-completion) - (exit-minibuffer)) - - :bind - (:map mct-minibuffer-local-completion-map - (("C-" . jao-mct-complete-and-go)))) + :bind (:map + mct-minibuffer-local-completion-map + (("" . mct-complete-and-exit) + ("" . minibuffer-complete-and-exit)) + :map mct-completion-list-mode-map + (("e" . mct-focus-minibuffer)))) (mct-mode 1) + #+end_src * marginalia #+begin_src emacs-lisp @@ -169,8 +166,8 @@ :config - (advice-add #'completing-read-multiple - :override #'consult-completing-read-multiple) + ;; (advice-add #'completing-read-multiple + ;; :override #'consult-completing-read-multiple) (require 'jao-compilation) (defun jao-consult-project-root () -- cgit v1.2.3