summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-04-22 04:17:34 +0100
committerjao <jao@gnu.org>2021-04-22 04:17:34 +0100
commit030f3d1e490fc9c361ee62da26d41cdd8df803cb (patch)
tree3ee3a5f3ebd0ced8c180622936ff35eb9a6e4476
parent8d78fe1da6ef29ae1394b40f20857acf7093d82b (diff)
downloadelibs-030f3d1e490fc9c361ee62da26d41cdd8df803cb.tar.gz
elibs-030f3d1e490fc9c361ee62da26d41cdd8df803cb.tar.bz2
completion: corfu+orderless is working well
-rw-r--r--completion.org72
-rw-r--r--email.org3
2 files changed, 13 insertions, 62 deletions
diff --git a/completion.org b/completion.org
index 0de9b55..ea46420 100644
--- a/completion.org
+++ b/completion.org
@@ -3,8 +3,7 @@
* completion styles
#+begin_src emacs-lisp
(use-package emacs
- :init (setq completion-styles '(basic partial-completion emacs22 initials)
- completion-category-defaults nil
+ :init (setq completion-category-defaults nil
completion-cycle-threshold 3
completion-category-overrides
'((file (styles . (partial-completion))))))
@@ -14,73 +13,21 @@
(use-package orderless
:ensure t
:init
- (setq orderless-skip-highlighting t
+ (setq completion-styles '(orderless)
+ orderless-skip-highlighting t
orderless-component-separator "[ -/]+"
- completion-styles '(orderless)
orderless-matching-styles
'(orderless-literal orderless-regexp orderless-initialism)))
#+end_src
-* company
- #+begin_src emacs-lisp :load no
- (use-package company
- :ensure t
- :custom ((company-backends '(company-capf
- company-files
- company-bbdb
- company-keywords))
- (company-idle-delay 0.2)
- (company-lighter "")
- (company-lighter-base "")
- (company-show-numbers nil)
- (company-selection-wrap-around t)
- (company-tooltip-limit 15)
- (company-tooltip-align-annotations t)
- (company-tooltip-offset-display 'lines)) ;; 'scrollbar
-
- :config
- (defun jao-complete-at-point ()
- "Complete using company unless we're in the minibuffer."
- (interactive)
- (if (window-minibuffer-p) (completion-at-point) (company-manual-begin)))
-
- (defun jao-company-use-in-tab ()
- (global-set-key [remap completion-at-point] #'jao-complete-at-point)
- (global-set-key [remap completion-symbol] #'jao-complete-at-point)
- (global-set-key (kbd "M-TAB") #'jao-complete-at-point))
-
- ;; (jao-company-use-in-tab)
-
- :bind (:map company-active-map
-
- ("<tab>" . #'company-complete-common-or-cycle)
- ("TAB" . #'company-complete-common-or-cycle)
-
- ("C-h" . #'company-show-doc-buffer)
- ("M-." . #'company-show-location)
-
- :filter (or (not (derived-mode-p 'eshell-mode))
- (company-explicit-action-p))
- ("<return>" . #'company-complete-selection)
- ("RET" . #'company-complete-selection))
- :diminish)
-
- ;; (global-company-mode 1)
- #+end_src
* corfu
#+begin_src emacs-lisp
(jao-load-path "corfu")
(use-package corfu
- :init
- (setq corfu-cycle t)
- (defun jao-corfu-next ()
- (interactive)
- (if (derived-mode-p 'eshell-mode)
- (corfu-complete)
- (corfu-next)))
+ :init (setq corfu-cycle t)
:bind (:map corfu-map
- ("TAB" . jao-corfu-next)
+ ("TAB" . corfu-next)
("S-TAB" . corfu-previous))
:hook ((eshell-mode . corfu-mode)
@@ -91,13 +38,16 @@
#+end_src
* vertico
#+begin_src emacs-lisp
+ (jao-load-path "vertico")
+
(use-package vertico
:ensure t
:init (setq vertico-count 20)
+
:config
- (defun jao--be-orderless (&rest _any)
- (setq-local completion-styles '(orderless)))
- (advice-add 'vertico--setup :before #'jao--be-orderless)
+ ;; (defun jao--be-orderless (&rest _any)
+ ;; (setq-local completion-styles '(orderless)))
+ ;; (advice-add 'vertico--setup :before #'jao--be-orderless)
(vertico-mode))
#+end_src
* marginalia
diff --git a/email.org b/email.org
index 7583ccc..d01eb13 100644
--- a/email.org
+++ b/email.org
@@ -379,7 +379,8 @@
,@(jao-notmuch--mboxes-search "feeds")
,(jao-notmuch--q "bml/today" nil "tb" '("tag:bigml" "date:1d.."))
,(jao-notmuch--q "jao/today" nil "tj" '("tag:jao" "date:1d.."))
- ,(jao-notmuch--q "toread" nil "r" '("tag:toread"))))
+ ,(jao-notmuch--q "toread" nil "r" '("tag:toread"))
+ ,(jao-notmuch--q "new" nil "n" '("tag:new"))))
(add-hook 'notmuch-hello-refresh-hook #'jao--refresh-agenda))
(setq notmuch-hello-sections '(notmuch-hello-insert-saved-searches