diff options
author | jao <jao@gnu.org> | 2021-04-18 02:57:10 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-04-18 02:57:38 +0100 |
commit | 4dc7928deecc29f7233d913e76453d39703e53be (patch) | |
tree | c612861dd259a648d2462d1717c32b37a8728dec | |
parent | 7d8344ac8af19d7a88c3547fa0ab8ced01135e86 (diff) | |
download | elibs-4dc7928deecc29f7233d913e76453d39703e53be.tar.gz elibs-4dc7928deecc29f7233d913e76453d39703e53be.tar.bz2 |
completion: corfu is delivering
-rw-r--r-- | completion.org | 34 | ||||
-rw-r--r-- | init.org | 6 |
2 files changed, 19 insertions, 21 deletions
diff --git a/completion.org b/completion.org index 38377c3..85ba314 100644 --- a/completion.org +++ b/completion.org @@ -7,8 +7,7 @@ completion-category-defaults nil completion-cycle-threshold 3 completion-category-overrides - '((file (styles . (partial-completion))) ; path expansion on / - (recoll-result . (partial-completion emacs22 initials))))) + '((file (styles . (partial-completion)))))) #+end_src * orderless #+begin_src emacs-lisp @@ -43,10 +42,14 @@ (interactive) (if (window-minibuffer-p) (completion-at-point) (company-manual-begin))) - :bind (([remap completion-at-point] . #'jao-complete-at-point) - ([remap complete-symbol] . #'jao-complete-at-point) + (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)) - :map company-active-map + ;; (jao-company-use-in-tab) + + :bind (:map company-active-map ("<tab>" . #'company-complete-common-or-cycle) ("TAB" . #'company-complete-common-or-cycle) @@ -58,21 +61,16 @@ (company-explicit-action-p)) ("<return>" . #'company-complete-selection) ("RET" . #'company-complete-selection)) + :diminish) - :bind* (("M-TAB" . #'jao-complete-at-point)) - - :diminish) - - (global-company-mode 1) - + ;; (global-company-mode 1) #+end_src * corfu #+begin_src emacs-lisp (jao-load-path "corfu") (use-package corfu :init - (setq tab-always-indent 'complete - completion-styles '(orderless) + (setq completion-styles '(orderless) corfu-cycle t) ;; Optionally use TAB for cycling, default is `corfu-complete'. @@ -80,11 +78,11 @@ ;; ("TAB" . corfu-next) ;; ("S-TAB" . corfu-previous)) - ;; :hook ((eshell-mode . corfu-mode) - ;; (haskell-interactive-mode . corfu-mode) - ;; (message-mode . corfu-mode) - ;; (prog-mode . corfu-mode) - ;; (lisp-interaction-mode . corfu-mode)) + :hook ((eshell-mode . corfu-mode) + (haskell-interactive-mode . corfu-mode) + (message-mode . corfu-mode) + (prog-mode . corfu-mode) + (lisp-interaction-mode . corfu-mode)) ) #+end_src * vertico @@ -1083,7 +1083,7 @@ (setq-default indent-tabs-mode nil) (setq indent-tabs-width 4) (setq-default default-tab-width 8) - (setq tab-always-indent t) ;; 'complete + (setq tab-always-indent 'complete) (setq kill-read-only-ok t) (setq view-read-only nil) #+end_src @@ -1329,7 +1329,7 @@ (interactive) (let ((fw (frame-width))) (delete-other-windows) - (cond ((or force (> fw 242)) + (cond ((or force (>= fw 240)) (let ((w (- (/ fw 3)))) (delete-other-windows) (split-window-horizontally w) @@ -1341,7 +1341,7 @@ (defun jao-bisect () (interactive) - (jao-trisect) + (jao-trisect t) (next-window) (delete-window)) #+END_SRC |