diff options
-rw-r--r-- | completion.org | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/completion.org b/completion.org index 7285bf5..ad35b9a 100644 --- a/completion.org +++ b/completion.org @@ -166,13 +166,12 @@ ("C-p" . jao-corfu-quit-or-previous))) (defun corfu-in-minibuffer () - "Enable Corfu in the minibuffer only if Mct/Vertico are not active." - (unless (or (bound-and-true-p mct--active) - (bound-and-true-p vertico--input)) + "Enable Corfu in the minibuffer only if vertico is not active." + (when (and window-system (not (bound-and-true-p vertico--input))) (corfu-mode 1))) - ;; (add-hook 'minibuffer-setup-hook #'corfu-in-minibuffer 1) - ;; (global-corfu-mode 1) + (add-hook 'minibuffer-setup-hook #'corfu-in-minibuffer 1) + (global-corfu-mode 1) #+end_src * vertico @@ -186,11 +185,10 @@ org-refile-use-outline-path t) :config - ;; Use `consult-completion-in-region' if Vertico is enabled. - ;; Otherwise use the default `completion--in-region' function. + (setq completion-in-region-function (lambda (&rest args) - (apply (if vertico-mode + (apply (if (and (not window-system) vertico-mode) #'consult-completion-in-region #'completion--in-region) args))) @@ -208,6 +206,7 @@ :bind (:map vertico-map (("RET" . vertico-directory-enter) ("M-<backspace>" . vertico-directory-delete-word) ("<backspace>" . vertico-directory-delete-char)))) + (vertico-mode) #+end_src |