Commit graph

7 commits

Author SHA1 Message Date
Henrik Lissner
08f8f57e2f
feat(corfu): vim-like C-n/C-p keybinds
In vim/evil, C-n/C-p invokes dabbrev, so we're doing the same, but
powered by cape-dabbrev, falling back to corfu-next/corfu-prev is a
corfu popup is already open.

Close: #7748
Co-authored-by: 45mg <45mg@users.noreply.github.com>
Co-authored-by: LemonBreezes <LemonBreezes@users.noreply.github.com>
2024-08-28 22:43:05 -04:00
Henrik Lissner
4a4a9a1ada
feat(corfu): add +corfu/toggle-auto-complete command 2024-08-28 22:26:47 -04:00
Henrik Lissner
b3ef202451
refactor(corfu): conform to naming conventions 2024-07-13 19:38:20 -04:00
Henrik Lissner
ce84690dc5
feat(evil): vim completion keybinds on C-x
Vim has a set of completion commands bound to the C-x prefix. We had
this for company, but with this commit, we now have them for the corfu
module.
2024-07-13 19:38:20 -04:00
Luigi Sartor Piucco
763464afdb
feat(corfu): general move-to-minibuffer impl
We previously implemented only consult/vertico as a target for export,
now we have all of them. It was necessary to use case-by-case
conditions, unfortunately, because other UIs have subtle quirks that
prevent a single generalized approach to work.

Ivy is almost compliant, but it needs beg and end to not be markers.

Helm doesn't replace `completion-in-region-function`, it expects to go
around the default `completion--in-region`. It's supposed to add the
advice by itself, but it's very unreliable, so we do the wrapping
manually.

Ido doesn't implement `completion-in-region` and its `completing-read`
is retricted to a list of strings as table, so we use default
`completion--in-region` with no bells or whistles.
2024-03-19 20:41:50 -03:00
Luigi Sartor Piucco
0588b42b46
feat(corfu,vertico): use equal orderless config
This removes the old `&` separator for Vertico (does anyone use that
instead of just space?) in favor of escapable space and unifies
orderless config with Corfu. Also implements smart separator
insert/escape/reset on `C-SPC`

Co-authored-by: Liam Hupfer <liam@hpfr.net>
2024-03-19 20:41:50 -03:00
Luigi Sartor Piucco
6949451b00
module: add :completion corfu
This commit's primary goal is allowing use of
[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
[Cape](https://github.com/minad/cape) capfs for certain modes.

Other optional or miscellaneous features include:

- Corfu is enabled in the minibuffer if `completion-at-point` is bound;
- Support for displaying the completion's documentation on a secondary
  popup;
- Support for terminal display if :os tty;
- Support for icons if +icons;
2024-03-19 20:41:36 -03:00