forked from purcell/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-corfu.el
34 lines (25 loc) · 1012 Bytes
/
init-corfu.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
;;; init-corfu.el --- Interactive completion in buffers -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
;; WAITING: haskell-mode sets tags-table-list globally, breaks tags-completion-at-point-function
;; TODO Default sort order should place [a-z] before punctuation
(setq tab-always-indent 'complete)
(when (maybe-require-package 'orderless)
(with-eval-after-load 'vertico
(require 'orderless)
(setq completion-styles '(orderless basic))))
(setq completion-category-defaults nil
completion-category-overrides nil)
(setq completion-cycle-threshold 4)
(when (maybe-require-package 'corfu)
(setq-default corfu-auto t)
(with-eval-after-load 'eshell
(add-hook 'eshell-mode-hook (lambda () (setq-local corfu-auto nil))))
(setq-default corfu-quit-no-match 'separator)
(add-hook 'after-init-hook 'global-corfu-mode)
(with-eval-after-load 'corfu
(corfu-popupinfo-mode))
;; TODO: https://github.com/jdtsmith/kind-icon
)
(provide 'init-corfu)
;;; init-corfu.el ends here