Commit graph

22 commits

Author SHA1 Message Date
Henrik Lissner
cffb3838ec
bump: :completion
abo-abo/swiper@1f88e54990 -> abo-abo/swiper@2a25a6fb5b
company-mode/company-mode@b0a522ac5b -> company-mode/company-mode@1a0fc12a9c
elken/yasnippet-capf@9043f82751 -> elken/yasnippet-capf@744dedb783
emacs-helm/helm@28f62344fe -> emacs-helm/helm@f8949afd9b
karthink/consult-dir@3f5f4b71eb -> karthink/consult-dir@15891383f3
minad/cape@e01e443023 -> minad/cape@f61da109a9
minad/consult@c87b0bf06d -> minad/consult@fe48522800
minad/corfu@35cd5a0f3c -> minad/corfu@cdc3e13ad3
minad/marginalia@3275d1f85c -> minad/marginalia@da72da4622
minad/vertico@68e51fda55 -> minad/vertico@ba650a7ab9
oantolin/embark@d3c9d1b4c8 -> oantolin/embark@9c166c4b96
oantolin/orderless@ac4aeb66f3 -> oantolin/orderless@53f5204ad3
radian-software/prescient.el@c39bf07c56 -> radian-software/prescient.el@0765418e43
seagle0128/nerd-icons-ivy-rich@7197614b27 -> seagle0128/nerd-icons-ivy-rich@86a896bb48

Close: #7862
Fix: #7863
2024-06-20 18:28:12 -04:00
Henrik Lissner
96e3255c33
nit: reformat+revise comments
Includes minor refactors to appease the byte-compiler or use more
succinct (but equivalent) syntax.
2024-04-09 12:39:51 -04:00
StrawberryTea
a8d612385f
tweak(corfu): update dabbrev-ignore-buffer-modes
The Corfu documentation has been updated to suggest more modes to ignore
with `dabbrev-ignore-buffer-modes`. This commit updates the list of
modes to ignore in `cape-dabbrev` to match the documentation.
2024-04-08 18:59:49 -04:00
StrawberryTea
f79bb46c9b fix(corfu): prevent void-variable error
Although this error will not be triggered by most people, since
auth-source is loaded by a lot of packages, it can still happen if you
are debugging your configuration (e.g. enabling/disabling modules
one-by-one).
2024-04-06 00:14:09 -04:00
Henrik Lissner
fb96c8df5a
refactor(corfu): use hook symbols in add-hook! calls
A common challenge for beginners is distinguishing packages, modes, and
hooks, and since Doom's source code is meant to second as another layer
of documentation, I prefer to be explicit with hook symbols in
`add-hook!` calls (at least, for internal/module use).
2024-04-05 12:06:02 -04:00
Henrik Lissner
52599ab536
bump: :completion
abo-abo/swiper@8c30f4cab5 -> abo-abo/swiper@1f88e54990
company-mode/company-mode@02903bd708 -> company-mode/company-mode@b0a522ac5b
emacs-helm/helm-descbinds@b725159823 -> emacs-helm/helm-descbinds@ca03f02da4
emacs-helm/helm@f34ea6b702 -> emacs-helm/helm@28f62344fe
minad/cape@a397a0c92d -> minad/cape@e01e443023
minad/consult@b48ff6bf05 -> minad/consult@c87b0bf06d
minad/corfu@c1e7b6190b -> minad/corfu@35cd5a0f3c
minad/marginalia@f6fe86b989 -> minad/marginalia@3275d1f85c
minad/vertico@68cbd47589 -> minad/vertico@68e51fda55
oantolin/embark@c93abadc82 -> oantolin/embark@d3c9d1b4c8
oantolin/orderless@dc7a781acf -> oantolin/orderless@ac4aeb66f3
radian-software/prescient.el@4b875be52e -> radian-software/prescient.el@c39bf07c56
sebastiencs/company-box@b6f53e26ad -> sebastiencs/company-box@c4f2e243fb
2024-04-03 17:21:16 -04:00
Henrik Lissner
1598444bd9
docs(corfu): disabling auto-completion
Close: #7749
Co-authored-by: 45mg <45mg@users.noreply.github.com>
2024-04-01 13:34:37 -04:00
Henrik Lissner
b533f5496c
tweak(corfu): corfu-auto-delay: 0.1 -> 0.18
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.
2024-03-28 16:58:28 -04:00
StrawberryTea
a83091469b
docs(corfu): debugging cape-dabbrev 2024-03-21 11:29:50 -04:00
Sean Farley
2bdeabb0cf refactor(corfu): consolidate +orderless logic without vertico
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.
2024-03-21 11:29:32 -04:00
Henrik Lissner
7547cdac6d
refactor(corfu): remove redundant setting
Upstream, corfu-preview-current is already 'insert by default.
2024-03-19 21:49:23 -04:00
Henrik Lissner
c9c221ca59
fix(corfu): wrong-type-argument characterp error
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.
2024-03-19 21:46:31 -04:00
Henrik Lissner
b52d2b2dd0
fix(corfu): ispell: only complain once per session 2024-03-19 21:43:15 -04:00
Henrik Lissner
875cd1aef9
fix(corfu): gate corfu-terminal config
If :completion corfu users don't have :os tty enabled, loading
corfu-terminal will throw an error in TTY Emacs.
2024-03-19 21:42:37 -04:00
Luigi Sartor Piucco
f9c0243211
docs(corfu): add @LemonBreezes as co-maintainer
Co-authored-by: StrawberryTea <look@strawberrytea.xyz>
2024-03-19 20:41:50 -03:00
StrawberryTea
bfb9aabe27
feat(corfu): update minibuffer hints manually
We need this advice to ensure that visual hints are updated before
exiting.
2024-03-19 20:41:50 -03:00
StrawberryTea
4192c81113
feat(corfu): make minibuffer completion optional 2024-03-19 20:41:50 -03: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
StrawberryTea
365a95de76
feat(corfu): more CAPFs and ergonomy changes
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.
2024-03-19 20:41:50 -03:00
Luigi Sartor Piucco
968a897530
feat(corfu): add snippets
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.
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