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.
This commit is contained in:
Luigi Sartor Piucco 2024-02-04 17:17:13 -03:00
parent a4c9c4cc44
commit 159f61a3a1
No known key found for this signature in database
GPG key ID: 6FF1A01853A47A66
4 changed files with 31 additions and 11 deletions

View file

@ -144,12 +144,11 @@ regarding your state. In normal-like states, enter insert then start corfu; in
visual-like states, perform [[help:evil-change][evil-change]] (which leaves you in insert state) then
start corfu; in insert-like states, start corfu immediatelly.
** Exporting to the minibuffer (requires [[doom-module::completion vertico]])
When using the [[doom-module::completion vertico]] module, which pulls in the
[[doom-package:consult]] package, the entries shown in the completion popup can be
exported to a consult minibuffer, giving access to all the manipulations the
Vertico suite allows. For instance, one could use this to export with
[[doom-package:embark]] via [[kbd:][C-c C-l]] and get a buffer with all candidates.
** Exporting to the minibuffer
The entries shown in the completion popup can be exported to a ~completing-read~
minibuffer, giving access to all the manipulations that suite allows. Using
Vertico for instance, one could use this to export with [[doom-package:embark]] via
[[kbd:][C-c C-l]] and get a buffer with all candidates.
** Manually call generic CAPFs
Completion at point functions have the property that, when called interactively