Commit graph

4 commits

Author SHA1 Message Date
Luigi Sartor Piucco
70c327a4f1
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`, so a small addition was made
to its module, because we weren't doing that. This was likely an
oversight due to the non-standard usage. This was fixed here because we
need it working for this feature.

Ido doesn't implement `completion-in-region` and its `completing-read`
is retricted to a list of strings as table, so it's treated the same as
absence of a framework, because it lacks the needed features.
2024-03-01 12:33:10 -03:00
Luigi Sartor Piucco
a5db530622
feat(corfu): impl smart confirm in minibuffer
An issue when using corfu in the minibuffer was the need for pressing
RET twice, since the first only inserts the completion. This commit
aliviates that by providing C-RET to ignore completion and conclude the
minibuffer imediately and S-RET to insert completion then conclude.
2024-03-01 12:33:10 -03:00
Luigi Sartor Piucco
b3bd325000
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-01 12:33:10 -03:00
Luigi Sartor Piucco
c6b7eb6e7c
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;
2024-03-01 12:33:09 -03:00