summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-04-20 04:42:05 +0100
committerjao <jao@gnu.org>2021-04-20 04:42:05 +0100
commit60cffd282c556532a3f4f3180f909c409051e629 (patch)
tree64c0d3fa0c90d1d2d019a918af1094ba7dd044d1
parent02ea4771f79fb33247cdf13c97af0104ae49d1a3 (diff)
downloadelibs-60cffd282c556532a3f4f3180f909c409051e629.tar.gz
elibs-60cffd282c556532a3f4f3180f909c409051e629.tar.bz2
corfu tweaks
-rw-r--r--completion.org16
1 files changed, 11 insertions, 5 deletions
diff --git a/completion.org b/completion.org
index e4fb949..0fe2de0 100644
--- a/completion.org
+++ b/completion.org
@@ -3,7 +3,7 @@
* completion styles
#+begin_src emacs-lisp
(use-package emacs
- :init (setq completion-styles '(basic emacs22 initials)
+ :init (setq completion-styles '(basic partial-completion emacs22 initials)
completion-category-defaults nil
completion-cycle-threshold 3
completion-category-overrides
@@ -16,6 +16,7 @@
:init
(setq orderless-skip-highlighting t
orderless-component-separator "[ -/]+"
+ completion-styles '(orderless)
orderless-matching-styles
'(orderless-literal orderless-regexp orderless-initialism)))
#+end_src
@@ -24,8 +25,8 @@
(use-package company
:ensure t
:custom ((company-backends '(company-capf
- company-bbdb
company-files
+ company-bbdb
company-keywords))
(company-idle-delay 0.2)
(company-lighter "")
@@ -70,11 +71,16 @@
(jao-load-path "corfu")
(use-package corfu
:init
- (setq completion-styles '(orderless)
- corfu-cycle t)
+ (setq corfu-cycle t)
+
+ (defun jao-corfu-next ()
+ (interactive)
+ (if (derived-mode-p 'eshell-mode)
+ (corfu-complete)
+ (corfu-next)))
:bind (:map corfu-map
- ("TAB" . corfu-next)
+ ("TAB" . jao-corfu-next)
("S-TAB" . corfu-previous))
:hook ((eshell-mode . corfu-mode)