Commit graph

1108 commits

Author SHA1 Message Date
Henrik Lissner
bd71e16cf4
bump: :completion corfu
minad/corfu@921dd7c97e -> minad/corfu@0a616caedf

Ref: minad/corfu@157b373abc
Fix: #7977
2024-09-04 15:04:21 -04:00
Henrik Lissner
84230a437d
fix(corfu): global-corfu-minibuffer predicate not respected
As mentioned in #7977, `global-corfu-modes` overrides any predicate
function in `global-corfu-minibuffer`. This is a stopgap until the issue
is resolved upstream.

Fix: #7977
Close: #8039
Co-authored-by: LemonBreezes <LemonBreezes@users.noreply.github.com>
2024-09-02 16:59:29 -04:00
Henrik Lissner
fb2f79033c
fix(corfu): disable corfu-auto in evil replace mode
Ref: 63e9b11280
2024-09-01 14:49:04 -04:00
Henrik Lissner
63e9b11280
feat(corfu): introduce +corfu-inhibit-auto-functions 2024-09-01 14:48:36 -04:00
Henrik Lissner
1ec4bac75e
bump: :completion
abo-abo/swiper@2a25a6fb5b -> abo-abo/swiper@8dc02d5b72
company-mode/company-mode@1a0fc12a9c -> company-mode/company-mode@e1d331a64e
elken/yasnippet-capf@744dedb783 -> elken/yasnippet-capf@4c2e33d70c
emacs-helm/helm@f8949afd9b -> emacs-helm/helm@06e0cf0148
minad/cape@f61da109a9 -> minad/cape@9110956a51
minad/consult-flycheck@754f5497d8 -> minad/consult-flycheck@3b999ae983
minad/consult@fe48522800 -> minad/consult@0c3f53916e
minad/corfu@cdc3e13ad3 -> minad/corfu@921dd7c97e
minad/marginalia@da72da4622 -> minad/marginalia@50a51c69f0
minad/vertico@ba650a7ab9 -> minad/vertico@c682ef50e6
oantolin/embark@9c166c4b96 -> oantolin/embark@19a13e344e
oantolin/orderless@53f5204ad3 -> oantolin/orderless@49d1fdfb80
radian-software/prescient.el@0765418e43 -> radian-software/prescient.el@2b8a8b4122
rainstormstudio/nerd-icons-completion@c2db8557a3 -> rainstormstudio/nerd-icons-completion@426a1d7c29

Close: #7977
Co-authored-by: LemonBreezes <LemonBreezes@users.noreply.github.com>
2024-09-01 14:47:09 -04:00
Henrik Lissner
10484dea87
merge: #7750
Close: #7750
2024-08-31 21:31:11 -04:00
Henrik Lissner
6671adc687
refactor!: move helpful from :core to :lang emacs-lisp
BREAKING CHANGE: This moves helpful.el out of core into :lang
emacs-lisp. Since most (all) people have this module enabled, this
shouldn't make a difference for most people, but if you're one of the
few that don't have :lang emacs-lisp enabled, Doom will revert to using
Emacs' built-in help.el and describe-* commands.

Others can also disable helpful with (package! helpful :disable t) if
they prefer Emacs' built-in help system, which wasn't possible before,
because it was a core package.

This was done as part of an ongoing effort to slim down Doom's core in
preparation for v3.
2024-08-30 02:26:41 -04:00
Henrik Lissner
5311214f90
tweak(corfu): don't invert evil-complete-all-buffers
And avoid void-variable errors for non-evil users (not that they're
bound for them, but just in case).

Ref: #7748
2024-08-29 01:18:43 -04:00
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
d6f5fed4a4
refactor(vertico): dabbrev-ignored-buffer-regexps: simplify 2024-08-26 02:22:53 -04:00
Henrik Lissner
b9e460bc64
refactor(vertico): remove redundant quoting
Ref: #7943
2024-08-25 17:44:29 -04:00
Wang Kai
3ad8ecc063 fix(vertico): orderless filtering
The original implementation of `+vertico-orderless-dispatch` match
pattern by prefix and suffix in pairs. In that case, '=&&' will go for
branch `(string-suffix-p "&" pattern)`, not `(string-prefix-p "="
pattern)`, which fail to filter literal '&&'.

We probably should match all prefixes first, then all suffixes. Just
like orderless does.

Ref: 178b0c55f2/orderless.el (L159)
2024-08-23 17:49:47 -04:00
Henrik Lissner
c78e49e862
tweak(corfu): corfu-auto-delay = 0.24
Increase the delay slightly, to stave off slowness with slower backends.
2024-08-20 21:49:41 -04:00
Henrik Lissner
5e2e886b35
nit: comment revision & reformatting 2024-08-15 23:18:47 -04:00
Henrik Lissner
4fcf332749
refactor: generalize fd/ripgrep vars & options
I intend to eventually replace projectile with project.el, so these
doom-projectile-* variables need to be generalized, starting with the
fd/ripgrep executable paths.

ALong with that, this refactors Doom's projectile-generic-command to
lean more on built-in fd support in projectile, where possible (fewer
wheels reinvented).

Ref: doomemacs/core#1
2024-08-09 21:03:37 -04:00
Henrik Lissner
d3124c4971
nit: add deprecation comments for projectile config
Ref: doomemacs/core#1
2024-08-09 20:42:33 -04:00
Henrik Lissner
559c1eef39
module: deprecate :completion company
Corfu effectively replaces Company. It's lighter, faster (in most
cases), and relies on more functionality native to Emacs (CAPF). The
company module is one of the more higher-maintenance (and buggy) modules
in our library, so rather than maintain two spiritually identical
modules, I'd rather focus on the better one.

I won't make any moves to actually remove the Company module until well
after the v3 release, when `doom sync` and `doom upgrade` have rollback
functionality, and those commands are better equipped to warn uses about
module deprecations (and we have our new Github Discussions board set
up, so we have a centralized place to announce them).
2024-07-29 02:01:27 -04:00
Henrik Lissner
4ca92f3dd0
module: deprecate :completion ivy
Ivy is practically Vertico's spiritual successor, and its module is one
of the more higher-maintenance modules in our library. Rather than
maintain two spiritually identicaly modules, I'd rather focus on the
better one.

I won't make any moves to actually remove the Ivy module until well
after the v3 release, when `doom sync` and `doom upgrade` have rollback
functionality, and those commands are better equipped to warn uses about
module deprecations (and we have our new Github Discussions board set
up, so we have a centralized place to announce them).
2024-07-29 02:01:27 -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
Henrik Lissner
234cc27b77
fix(ivy): +counsel-rg-suppress-error-code-a
Corrects the signature of process-exit-status.

Amend: 6ef86098cb
2024-07-10 04:02:21 -04:00
Henrik Lissner
6ef86098cb
fix(ivy): counsel-rg dying on non-zero exit code
Monkey-patches counsel-rg to ignore non-zero exit codes. This may have
other side effects, but despite it still producing workable resutls, the
command will discard all its results if there are any errors while
scanning a directory.

Ref: abo-abo/swiper#2339
Fix: #3038
2024-07-10 03:55:03 -04:00
Henrik Lissner
481753bd5e
refactor!: remove pcre2el package
BREAKING CHANGE: This removes the pcre2el package, which Doom was using
solely for one function to escape PCREs. In the interest of thinning out
Doom's core, I've hoisted a simpler version of the function into Doom's
stdlib so I can remove the dependency.
2024-07-01 18:11:34 -04:00
Henrik Lissner
3cb9f17132
merge: pull request #7739 from LemonBreezes/corfu-update-smart-tab
feat(corfu): update smart tab completion
2024-06-30 15:24:52 -04:00
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
StrawberryTea
390f5920a2
Merge branch 'master' into corfu-update-smart-tab 2024-04-12 13:45:44 -05:00
StrawberryTea
cfb860f71a doc(corfu): update troubleshooting section 2024-04-12 13:24:58 -05: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
Henrik Lissner
42de6282f4
tweak(helm): helm-always-two-windows = t
Don't comandeer the entire frame for helm commands.
2024-04-08 21:20:08 -04:00
Henrik Lissner
a4b7aa1c56
fix(helm): helm-descbinds-disable-which-key = nil
Otherwise, helm-descbind throws errors if which-key is enabled. Setting
prefix-help-command seems to resolve the incompatibility (more testing
is needed).

Ref: emacs-helm/helm-descbinds@ca03f02da4
Ref: emacs-helm/helm-descbinds@14d1929d54
Amend: 52599ab536
2024-04-08 19:53:46 -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
4f07e83b6e fix(vertico): missing command error in consult
Although it is rare for a user to not enable the :config default module,
enabling/disabling modules one-by-one is common practice for debugging
Doom Emacs. This PR fixes an error that occurs when you have :completion
vertico enabled without enabling :config default.
2024-04-06 00:14:47 -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
22fa4ccac7
tweak(vertico): consult-dir: use projectile 2024-04-01 13:44:25 -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
45mg
97690184af docs(corfu): both option for RET behavior 2024-04-01 14:49:06 +00:00
StrawberryTea
cfdae2365c feat(corfu): update smart tab completion
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.
2024-04-01 07:55:13 -05: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
Henrik Lissner
18c88621a4
refactor(vertico): don't use bind-key
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!).
2024-03-24 18:03:12 -04:00
45mg
dd18fa16be feat(corfu): both option for RET behavior
Adds a new value of `+corfu-want-ret-to-confirm` to cover the case where
the user wants to select the candidate as well as perform the normal
behavior of RET.

Also, the logic for RET behavior has been refactored for clarity, and
the variable's documentation has been clarified a little.
2024-03-23 19:28:26 +05:30
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
Sean Farley
d3a00ba6af nit(vertico): fix spelling in some docstrings 2024-03-21 11:29:19 -04:00
Sean Farley
222dc47060 feat(vertico): add orderless annotation filtering
Ref: oantolin/orderless#162
2024-03-21 11:29:19 -04:00
Henrik Lissner
d22fa5a670
fix(vertico): consult-dir: don't guess user from containers
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>
2024-03-20 03:09:05 -04:00
Henrik Lissner
0ea84d1c3b
feat(vertico): add consult-yasnippet
Close: #7471
Co-authored-by: LemonBreezes <LemonBreezes@users.noreply.github.com>
2024-03-20 00:16:29 -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