From 052ed3c164907e90a7fedb1e9631efddfb03c478 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 14 Apr 2022 17:20:17 +0100 Subject: so long, mct, welcome back, trusty vertico! --- completion.org | 55 +++++++++++++++++++++++++----------------------- lib/themes/jao-themes.el | 4 ---- 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/completion.org b/completion.org index cc3dfb6..25debf6 100644 --- a/completion.org +++ b/completion.org @@ -95,32 +95,6 @@ orderless-matching-styles '(orderless-literal orderless-regexp orderless-prefixes))) - #+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-completion-window-size '(mct--frame-height-fraction . 1) - mct-live-update-delay 0.3 - mct-live-completion t ;; 'visible - mct-completion-blocklist nil - mct-completion-passlist '(dtache-consult-session - imenu - Info-goto-node - Info-index - Info-menu - jao-buffer-same-mode - jao-eww-reopen - vc-retrieve-tag))) - - (mct-minibuffer-mode 1) - #+end_src * marginalia #+begin_src emacs-lisp @@ -201,6 +175,35 @@ (corfu-global-mode 1) + #+end_src +* vertico + #+begin_src emacs-lisp + (use-package vertico + :ensure t + :init + (setq vertico-count 10 + vertico-cycle t + vertico-resize t + org-refile-use-outline-path t) + + :config + + (defun jao-vertico--display-candidates (lines) + (move-overlay vertico--candidates-ov (point-min) (point-min)) + (overlay-put vertico--candidates-ov 'after-string (apply #'concat lines)) + (vertico--resize-window (length lines))) + + (advice-add 'vertico--display-candidates + :override #'jao-vertico--display-candidates)) + + (use-package vertico-directory + :after vertico + :bind (:map vertico-map (("RET" . vertico-directory-enter) + ("M-" . vertico-directory-delete-word) + ("" . vertico-directory-delete-char)))) + + (vertico-mode) + #+end_src * consult *** package diff --git a/lib/themes/jao-themes.el b/lib/themes/jao-themes.el index cd8a0f0..d4a7ce9 100644 --- a/lib/themes/jao-themes.el +++ b/lib/themes/jao-themes.el @@ -836,10 +836,6 @@ (markdown-code-face (p keyword)) (markdown-inline-code-face (p function)) (markdown-italic-face (~ italic)) - (mct-highlight-candidate (p hilite) ex) - (mct-line-number (p hilite)) - (mct-line-number-current (~ mct-line-number) bf) - (mct-stripe (p dimm) ex) (menu (~ default)) (message-cited-text-1 (p f10)) (message-cited-text-2 (p f11)) -- cgit v1.2.3