summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-05-20 23:15:20 +0100
committerjao <jao@gnu.org>2022-05-20 23:15:20 +0100
commitb8fa1bfbf40f32ac84aa45c53ae349f65d7073d7 (patch)
tree30160acd19d5c4e0a781fb08edd4b823e8a1388d
parent1a9bf87a43a8d3c5e8fd2b30fc7d6ac696be7ef5 (diff)
downloadelibs-b8fa1bfbf40f32ac84aa45c53ae349f65d7073d7.tar.gz
elibs-b8fa1bfbf40f32ac84aa45c53ae349f65d7073d7.tar.bz2
better term support: corfu
-rw-r--r--completion.org15
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