From f04359f2ea968ba93faa808961ad15220bbc4640 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sun, 20 Mar 2022 10:13:01 +0800 Subject: Improve completion config (emacs) --- .emacs.d/lisp/init-company.el | 2 +- .emacs.d/lisp/init-corfu.el | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to '.emacs.d') diff --git a/.emacs.d/lisp/init-company.el b/.emacs.d/lisp/init-company.el index 12e409e..1f7a097 100644 --- a/.emacs.d/lisp/init-company.el +++ b/.emacs.d/lisp/init-company.el @@ -9,7 +9,7 @@ (setq company-global-modes '(emacs-lisp-mode go-mode ledger-mode sh-mode c++-mode)) (setq company-minimum-prefix-length 1 - company-idle-delay (lambda () (if (company-in-string-or-comment) nil 0.3)) + company-idle-delay (lambda () (if (company-in-string-or-comment) nil 0.01)) company-selection-wrap-around t) (provide 'init-company) diff --git a/.emacs.d/lisp/init-corfu.el b/.emacs.d/lisp/init-corfu.el index ec88b8d..7b5899d 100644 --- a/.emacs.d/lisp/init-corfu.el +++ b/.emacs.d/lisp/init-corfu.el @@ -9,7 +9,9 @@ (setq corfu-cycle t corfu-auto t corfu-quit-no-match t - corfu-preselect-first nil) + corfu-preselect-first nil + corfu-auto-prefix 1 + corfu-auto-delay 0.01) (with-eval-after-load 'corfu (define-key corfu-map (kbd "TAB") 'corfu-next) -- cgit v1.2.3