dev: merging from main
This commit is contained in:
commit
e14e30df50
20 changed files with 255 additions and 130 deletions
|
@ -220,6 +220,14 @@ To disable idle (as-you-type) completion, unset ~corfu-auto~:
|
|||
(setq corfu-auto nil))
|
||||
#+end_src
|
||||
|
||||
** Turning off auto-completion
|
||||
To disable idle (as-you-type) completion, unset ~corfu-auto~:
|
||||
#+begin_src emacs-lisp
|
||||
;;; in $DOOMDIR/config.el
|
||||
(after! corfu
|
||||
(setq corfu-auto nil))
|
||||
#+end_src
|
||||
|
||||
** Adding CAPFs to a mode
|
||||
To add other CAPFs on a mode-per-mode basis, put either of the following in your
|
||||
~config.el~:
|
||||
|
|
|
@ -40,7 +40,8 @@ TAB/S-TAB.")
|
|||
('aggressive
|
||||
(not (or (bound-and-true-p mct--active)
|
||||
(bound-and-true-p vertico--input)
|
||||
(eq (current-local-map) read-passwd-map)
|
||||
(and (featurep 'auth-source)
|
||||
(eq (current-local-map) read-passwd-map))
|
||||
(and (featurep 'helm-core) (helm--alive-p))
|
||||
(and (featurep 'ido) (ido-active))
|
||||
(where-is-internal 'minibuffer-complete
|
||||
|
@ -114,10 +115,10 @@ TAB/S-TAB.")
|
|||
(use-package! cape
|
||||
:defer t
|
||||
:init
|
||||
(add-hook! prog-mode
|
||||
(add-hook! 'prog-mode-hook
|
||||
(defun +corfu-add-cape-file-h ()
|
||||
(add-hook 'completion-at-point-functions #'cape-file -10 t)))
|
||||
(add-hook! (org-mode markdown-mode)
|
||||
(add-hook! '(org-mode-hook markdown-mode-hook)
|
||||
(defun +corfu-add-cape-elisp-block-h ()
|
||||
(add-hook 'completion-at-point-functions #'cape-elisp-block 0 t)))
|
||||
;; Enable Dabbrev completion basically everywhere as a fallback.
|
||||
|
@ -126,8 +127,12 @@ TAB/S-TAB.")
|
|||
;; Set up `cape-dabbrev' options.
|
||||
(defun +dabbrev-friend-buffer-p (other-buffer)
|
||||
(< (buffer-size other-buffer) +corfu-buffer-scanning-size-limit))
|
||||
(add-hook! (prog-mode text-mode conf-mode comint-mode minibuffer-setup
|
||||
eshell-mode)
|
||||
(add-hook! '(prog-mode-hook
|
||||
text-mode-hook
|
||||
conf-mode-hook
|
||||
comint-mode-hook
|
||||
minibuffer-setup-hook
|
||||
eshell-mode-hook)
|
||||
(defun +corfu-add-cape-dabbrev-h ()
|
||||
(add-hook 'completion-at-point-functions #'cape-dabbrev 20 t)))
|
||||
(after! dabbrev
|
||||
|
|
|
@ -161,13 +161,16 @@ orderless."
|
|||
(consult-customize
|
||||
consult-ripgrep consult-git-grep consult-grep
|
||||
consult-bookmark consult-recent-file
|
||||
+default/search-project +default/search-other-project
|
||||
+default/search-project-for-symbol-at-point
|
||||
+default/search-cwd +default/search-other-cwd
|
||||
+default/search-notes-for-symbol-at-point
|
||||
+default/search-emacsd
|
||||
consult--source-recent-file consult--source-project-recent-file consult--source-bookmark
|
||||
:preview-key "C-SPC")
|
||||
(when (modulep! :config default)
|
||||
(consult-customize
|
||||
+default/search-project +default/search-other-project
|
||||
+default/search-project-for-symbol-at-point
|
||||
+default/search-cwd +default/search-other-cwd
|
||||
+default/search-notes-for-symbol-at-point
|
||||
+default/search-emacsd
|
||||
:preview-key "C-SPC"))
|
||||
(consult-customize
|
||||
consult-theme
|
||||
:preview-key (list "C-SPC" :debounce 0.5 'any))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue