At 0.1, Corfu pops up too aggressively and too often, even for fast
typists. This is especially disruptive with slow backends that might
block Emacs. I think 0.18-0.24 is the goldilocks zone, so I'll start
with 0.18, and maybe increase it later.
This is the only internal usage of :bind, which I want to avoid, because
it pulls in bind-key, which offers no real benefit over just about any
other key binding function or macro, so I'd rather use what is already
available (like map!).
This tidy ups the corfu module to use the logic when a user enables
corfu +orderless without enabling vertico. Since that's probably a niche
situation, we only specify commit to pin to orderless in the vertico
module so that contributors aren't tripped up with trying to remember to
update orderless in two different code locations. Of course, if this
turns out to be a more popular use-case we can re-evaluate this logic.
This commit updates the smart tab functionality so that:
1. The only functionality checked is for the modules that are enabled.
2. The priority of the TAB behavior is tunable by the user.
This also updates the TAB behavior for the Corfu module to be
`indent-for-tab-command` instead of `completion-at-point` so that users
can use the TAB key to indent their code and navigating Org tables.
We also address #7372 by checking overriding-terminal-local-map, as that
is used by Embark.
The tramp string used to connect to the container uses the first
`container-runtime ps` argument as a username, but the first argument
returned is the container ID, not a username.
Close: #7674
Co-authored-by: bergmannf <bergmannf@users.noreply.github.com>
Co-authored-by: elken <elken@users.noreply.github.com>
Corfu doesn't support a nil corfu-separator in general, but
+corfu-smart-sep-toggle-escape, specifically, will throw a characterp
type error if the user hasn't enabled +orderless.
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.
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>
Add CAPFs from cape:
- `cape-dabbrev`;
- `cape-elisp-block`;
- `cape-file`;
Fix some CAPFs via cape:
- Make non-exclusive, purified and silent `pcomplete-completions-at-point`;
- Make non-exclusive and non-interruptable `lsp-completion-at-point`;
- Make non-exclusive `eglot-completion-at-point`;
- Make non-exclusive `comint-completion-at-point`;
Fix and improve keybindings:
- Smart `DEL`;
Add depth to CAPFs, allowing ordering to be adjustable.
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'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;
Previously, a distinction was made only between "regular" style (assumed
to be for people who prefer to cycle directionally and commit with RET)
and +tng (assumed to be for people who prefer TAB and auto-commit). This
made composing further variations harder on the user, as they would have
to work around our bindings. Now we have many features as documentation,
and the user can compose to their liking. The global CAPF list was
pruned, suggesting to use individual keys for those functions if
required.
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.
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.
Bindings were moved to the `:config default` module and some keys were
adjusted to match Company/other modules. The changes were documented in
the README.
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>
Add various CAPFs from cape:
- `cape-dabbrev`;
- `cape-emoji`;
- `cape-dict`;
Fixed some CAPFs via cape:
- Make non-exclusive, purified and silent `pcomplete-completions-at-point`;
- Make non-exclusive and non-interruptable `lsp-completion-at-point`;
- Make non-exclusive `eglot-completion-at-point`;
- Make non-exclusive `comint-completion-at-point`;
Fix and improve keybindings:
- Smart `DEL`/`backspace` for `+tng`;
- Smart `RET`;
Add depth to CAPFs, allowing ordering to be adjustable.
Enable in minibuffer.
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'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;