module: add :completion corfu

This commit's primary goal is allowing use of
[minad/corfu](https://github.com/minad/corfu) as an alternative to
[company](https://github.com/company-mode/company-mode). It introduces a
module under :completion for this purpose, plus some conditionals on
other relevant modules to toggle functionality like lsp back-ends and
[minad/cape](https://github.com/minad/cape) capfs for certain modes.

Other optional or miscellaneous features include:

- Support for displaying the completion's documentation on a secondary
  popup;
- Support for terminal display if :os tty;
- Support for icons if +icons;
- Support for tab-and-go completion if +tng;
This commit is contained in:
Luigi Sartor Piucco 2022-09-24 17:33:32 -03:00
parent a0344ffc3a
commit 5532c68e53
No known key found for this signature in database
GPG key ID: 6FF1A01853A47A66
5 changed files with 294 additions and 1 deletions

View file

@ -138,8 +138,11 @@ server getting expensively restarted when reverting buffers."
" "))
(add-to-list 'global-mode-string
'(t (:eval lsp-modeline-icon))
'append))))))
'append)))))
(when (modulep! :completion corfu)
(setq lsp-completion-provider :none)
(add-hook 'lsp-mode-hook #'lsp-completion-mode)))
(use-package! lsp-ui
:hook (lsp-mode . lsp-ui-mode)