diff options
author | jao <jao@gnu.org> | 2021-12-03 02:10:05 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-12-03 02:10:05 +0000 |
commit | 32e12c8344a5b05d7b52f3bbe2c32cea3a3a1d5d (patch) | |
tree | e8d370aa18d1caf350a1003769515256412f2bdc | |
parent | 932f3f34745ed376b5c63e90ebf75103f26f5d7c (diff) | |
download | elibs-32e12c8344a5b05d7b52f3bbe2c32cea3a3a1d5d.tar.gz elibs-32e12c8344a5b05d7b52f3bbe2c32cea3a3a1d5d.tar.bz2 |
corfu, approaching perfection (via consistency with mct)
-rw-r--r-- | completion.org | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/completion.org b/completion.org index c0b0a88..b9c273d 100644 --- a/completion.org +++ b/completion.org @@ -60,7 +60,7 @@ corfu-cycle t corfu-count 15 corfu-quit-no-match t - corfu-auto nil + corfu-auto t corfu-commit-predicate nil corfu-preview-current nil corfu-preselect-first nil @@ -86,12 +86,15 @@ (jao-corfu-no-auto eshell) (add-to-list 'corfu-excluded-modes 'notmuch-message-mode) + (defun jao-corfu-quit-or-insert () + (interactive) + (if (and (>= corfu--index 0) (/= corfu--index corfu--preselect)) + (corfu-insert) + (corfu-quit))) + :bind (:map corfu-map - ("C-<return>" . newline) - ("TAB" . corfu-next) - ([tab] . corfu-next) - ("S-TAB" . corfu-previous) - ([backtab] . corfu-previous))) + ("C-<return>" . corfu-insert) + ("\r" . jao-corfu-quit-or-insert))) (corfu-global-mode 1) |