feat(corfu): always configure dabbrev & line
This commit is contained in:
parent
46ce67aa6d
commit
f2562bbb4a
1 changed files with 19 additions and 17 deletions
|
@ -188,7 +188,6 @@ major mode regardless of size.")
|
||||||
(add-hook 'completion-at-point-functions #'cape-elisp-block 0 t))
|
(add-hook 'completion-at-point-functions #'cape-elisp-block 0 t))
|
||||||
|
|
||||||
;; Enable Dabbrev completion basically everywhere as a fallback.
|
;; Enable Dabbrev completion basically everywhere as a fallback.
|
||||||
(when (modulep! +dabbrev)
|
|
||||||
;; Set up `cape-dabbrev' options.
|
;; Set up `cape-dabbrev' options.
|
||||||
(defun +dabbrev-friend-buffer-p (other-buffer)
|
(defun +dabbrev-friend-buffer-p (other-buffer)
|
||||||
(< (buffer-size other-buffer) +cape-buffer-scanning-size-limit))
|
(< (buffer-size other-buffer) +cape-buffer-scanning-size-limit))
|
||||||
|
@ -199,10 +198,12 @@ major mode regardless of size.")
|
||||||
"^ "
|
"^ "
|
||||||
"\\(TAGS\\|tags\\|ETAGS\\|etags\\|GTAGS\\|GRTAGS\\|GPATH\\)\\(<[0-9]+>\\)?")
|
"\\(TAGS\\|tags\\|ETAGS\\|etags\\|GTAGS\\|GRTAGS\\|GPATH\\)\\(<[0-9]+>\\)?")
|
||||||
dabbrev-upcase-means-case-search t)
|
dabbrev-upcase-means-case-search t)
|
||||||
|
(when (modulep! +dabbrev)
|
||||||
(add-hook! (prog-mode text-mode conf-mode comint-mode minibuffer-setup
|
(add-hook! (prog-mode text-mode conf-mode comint-mode minibuffer-setup
|
||||||
eshell-mode)
|
eshell-mode)
|
||||||
(add-hook 'completion-at-point-functions #'cape-dabbrev 20 t)))
|
(add-hook 'completion-at-point-functions #'cape-dabbrev 20 t)))
|
||||||
(when (modulep! +line)
|
|
||||||
|
|
||||||
;; Set up `cape-line' options.
|
;; Set up `cape-line' options.
|
||||||
(defun +cape-line-buffers ()
|
(defun +cape-line-buffers ()
|
||||||
(cl-loop for buf in (buffer-list)
|
(cl-loop for buf in (buffer-list)
|
||||||
|
@ -210,6 +211,7 @@ major mode regardless of size.")
|
||||||
(< (buffer-size buf) +cape-buffer-scanning-size-limit))
|
(< (buffer-size buf) +cape-buffer-scanning-size-limit))
|
||||||
collect buf))
|
collect buf))
|
||||||
(setq cape-line-buffer-function #'+cape-line-buffers)
|
(setq cape-line-buffer-function #'+cape-line-buffers)
|
||||||
|
(when (modulep! +line)
|
||||||
(add-hook! (text-mode comint-mode minibuffer-setup)
|
(add-hook! (text-mode comint-mode minibuffer-setup)
|
||||||
(add-hook 'completion-at-point-functions #'cape-line 20 t)))
|
(add-hook 'completion-at-point-functions #'cape-line 20 t)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue