feat(corfu): add snippets
Yasnippet is now properly integrated! A previosly-unset default has now been given to `corfu-on-exact-match`. With snippets, it causes immediate expansion upon single match by default, so we set it to nil and recommend against changing it in the README.
This commit is contained in:
parent
6949451b00
commit
968a897530
3 changed files with 12 additions and 1 deletions
|
@ -67,6 +67,14 @@ Possible values are:
|
|||
(advice-add 'pcomplete-completions-at-point :around #'cape-wrap-silent)
|
||||
(advice-add 'pcomplete-completions-at-point :around #'cape-wrap-purify)))
|
||||
|
||||
(use-package! yasnippet-capf
|
||||
:when (modulep! :editor snippets)
|
||||
:defer t
|
||||
:init
|
||||
(add-hook! 'yas-minor-mode-hook
|
||||
(defun +corfu-add-yasnippet-capf-h ()
|
||||
(add-hook 'completion-at-point-functions #'yasnippet-capf 30 t))))
|
||||
|
||||
(use-package! corfu-terminal
|
||||
:when (not (display-graphic-p))
|
||||
:hook ((corfu-mode . corfu-terminal-mode)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue