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
c6b7eb6e7c
commit
a866bf82f6
3 changed files with 12 additions and 1 deletions
|
@ -83,6 +83,14 @@
|
|||
(add-to-list 'completion-at-point-functions #'cape-elisp-block)))
|
||||
(advice-add #'lsp-completion-at-point :around #'cape-wrap-noninterruptible))
|
||||
|
||||
(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