Commit Graph

1135 Commits

Author SHA1 Message Date
760a92e952 fix(ivy): counsel-projectile-switch-project: empty list on first run
This is due to `counsel-projectile-switch-project` not initializing the
known projects list before consulting the `projectile-known-projects`
variable (or at the very least, calling the function of the same name,
rather than referencing the variable directly). By changing
counsel-projectile-remove-current-project, it now does.
2025-04-02 04:13:50 -04:00
951df2dbee bump: :completion
LuigiPiucco/nerd-icons-corfu@13166345b2 -> LuigiPiucco/nerd-icons-corfu@55b17ee20a
abo-abo/swiper@db61f55bc2 -> abo-abo/swiper@e33b028ed4
emacs-helm/helm@c0b70dbc26 -> emacs-helm/helm@f948dc4464
minad/cape@2e86b6deed -> minad/cape@f72ebcaeff
minad/consult@d557305b73 -> minad/consult@f94d557807
minad/corfu@c302b0526a -> minad/corfu@061d926d0f
minad/marginalia@a527fb03b7 -> minad/marginalia@c51fd9e4d4
minad/vertico@026a81a9c8 -> minad/vertico@e0bb699ebf
oantolin/orderless@c7cb04499d -> oantolin/orderless@254f241248
2025-04-01 15:50:03 -04:00
d775ed822c fix(corfu): void-variable local-map error
Amend: #8262
2025-04-01 00:47:32 -04:00
0d1c8942db fix(corfu): fix default minibuffer completion
After setting +corfu-want-minibuffer-completion to t, I noticed that it
Corfu was still being enabled in Consult when finding files. This change
fixes that by ensuring that Corfu gets disabled in the minibuffer
whenever another completion framework is active.
2025-04-01 00:16:03 -04:00
52183d717d fix(corfu): void-variable cape-file-prefix error
Amend: 2eca701615
Ref: #6289
2025-03-31 09:31:07 -04:00
00d624d66a tweak(corfu): completions-first-difference: don't nullify :inherit
This should be left to themes to address, not our defaults.
2025-03-31 09:31:07 -04:00
74817a6f25 nit(corfu): revise comments, grammar, and formatting 2025-03-31 09:31:07 -04:00
f3165c1c5b fix(corfu): corfu-terminal for daemon users
Since this package disables no-op's itself when not in the terminal,
it's safe to keep on in GUI sessions.
2025-03-31 09:31:06 -04:00
dfe5b8d4e9 refactor(corfu): conform to conventions 2025-03-31 00:59:25 -04:00
2eca701615 fix(corfu): trigger cape-file on { in latex buffers
Fix: #6289
2025-03-31 00:59:25 -04:00
dac6e05b87 refactor: deprecate appendq!, prependq!, & delq! macros
In the interest of slimming down Doom's core (as we near v3), I've
deprecated these macros. They doesn't really need to exist. Sure, the
alternatives aren't as ergonomic or elegant, but they're good enough
that we don't need these trivial wrappers. Their local uses have been
refactored out as well.
2025-03-25 14:16:56 -04:00
53387f4905 fix(vertico): remove undefined completion style
Remove undefined style completion type `+vertico-basic-remote`, fixing
`invalid completion style` errors emitted from `vertico--exhibit`.

Ref: https://github.com/doomemacs/doomemacs/issues/7491#issuecomment-2012682178
Fix: #7491
2025-03-23 21:27:26 -04:00
c95015d706 bump: :completion
LuigiPiucco/nerd-icons-corfu@0a932e89cf -> LuigiPiucco/nerd-icons-corfu@13166345b2
abo-abo/swiper@abb9e1e564 -> abo-abo/swiper@db61f55bc2
company-mode/company-mode@5bb6f6d3d4 -> company-mode/company-mode@8d599ebc8a
elken/yasnippet-capf@4c2e33d70c -> elken/yasnippet-capf@de6446732b
emacs-helm/helm-org@9b7d5d4fd1 -> emacs-helm/helm-org@22d60952f8
emacs-helm/helm@cf557ff745 -> emacs-helm/helm@c0b70dbc26
karthink/consult-dir@6cb46395df -> karthink/consult-dir@4532b8d215
minad/cape@50fdb70807 -> minad/cape@2e86b6deed
minad/consult@ce38dd0377 -> minad/consult@d557305b73
minad/vertico@ac82acf177 -> minad/vertico@026a81a9c8
seagle0128/nerd-icons-ivy-rich@86a896bb48 -> seagle0128/nerd-icons-ivy-rich@5006f91b49
2025-03-13 01:08:08 -04:00
bca4265e64 fix(vertico): fix display with embark-act-all 2025-03-13 01:02:08 -04:00
bc3f0ce718 fix(vertico): void-function consult--async-split-style error
Amend: ffc5c60721
Fix: #8282
Ref: minad/consult@bdc4a9724c
2025-02-25 22:06:06 -05:00
ffc5c60721 bump: :completion
LuigiPiucco/nerd-icons-corfu@7077bb76fe -> LuigiPiucco/nerd-icons-corfu@0a932e89cf
abo-abo/swiper@8dc02d5b72 -> abo-abo/swiper@abb9e1e564
bbatsov/helm-projectile@e2e38825c9 -> bbatsov/helm-projectile@041076e35a
company-mode/company-mode@e1d331a64e -> company-mode/company-mode@5bb6f6d3d4
emacs-helm/helm-descbinds@ca03f02da4 -> emacs-helm/helm-descbinds@c12bc85ef3
emacs-helm/helm-org@c80e53315c -> emacs-helm/helm-org@9b7d5d4fd1
emacs-helm/helm@06e0cf0148 -> emacs-helm/helm@cf557ff745
karthink/consult-dir@15891383f3 -> karthink/consult-dir@6cb46395df
mhayashi1120/Emacs-wgrep@208b9d01cf -> mhayashi1120/Emacs-wgrep@49f09ab9b7
minad/cape@9110956a51 -> minad/cape@50fdb70807
minad/consult-flycheck@3b999ae983 -> minad/consult-flycheck@3bc2141daf
minad/consult@0c3f53916e -> minad/consult@ce38dd0377
minad/corfu@0a616caedf -> minad/corfu@c302b0526a
minad/marginalia@50a51c69f0 -> minad/marginalia@a527fb03b7
minad/vertico@c682ef50e6 -> minad/vertico@ac82acf177
oantolin/embark@19a13e344e -> oantolin/embark@d5df0eff18
oantolin/orderless@49d1fdfb80 -> oantolin/orderless@c7cb04499d
radian-software/prescient.el@2b8a8b4122 -> radian-software/prescient.el@7dd5b53886
rainstormstudio/nerd-icons-completion@426a1d7c29 -> rainstormstudio/nerd-icons-completion@8e5b995eb2
tumashu/ivy-posframe@533a8e368f -> tumashu/ivy-posframe@660c773f55
tumashu/vertico-posframe@2e0e09e5bb -> tumashu/vertico-posframe@c5a8b5f72a

Fix: #8282
2025-02-24 23:40:00 -05:00
a55e4a5aac docs(vertico): suppress grep warnings if ripgrep is available
Fix: #8231
2025-01-10 11:14:03 -05:00
0ef4a3f9e1 tweak(vertico): remove consult-man remapping
consult-man is not a good drop-in replacement for man. consult-man
searches man pages and descriptions (like the apropos program).
The original man function lets the user pick a man page from the list of
man pages.
2025-01-09 00:59:12 -05:00
0a715cc3f2 refactor: (if|when)-let -> (if|when)-let*
With the former macros' future in the air (and likely to be targeted in
future, potentially breaking changes), I'll deal with this now than have
it bite me later.

Ref: https://lists.gnu.org/archive/html/emacs-devel/2024-10/msg00637.html
2025-01-08 19:33:37 -05:00
448bc5cae2 refactor: use negated flags
Ref: 7a806521a92c
2024-10-20 02:41:50 -04:00
15904349cf refactor!: module API
BREAKING CHANGE: This backports some architectural choices from v3.0.
This changes Doom's module API, renaming some functions and removing
others, in order to facilitate some new features, prepare to move Doom's
modules into separate repos, and make way for two, much larger breaking
commits coming in the next few days.

This commit won't break anything for users unless they're tinkering with
Doom's internals/using its `doom-module-*` API directly. I am avoiding
broader backwards incompatibilities until the 3.0 release.

What's new:

- Negated flags. (modulep! :editor evil -everywhere) will return non-nil
  if :editor evil is active without its +everywhere flag.
- `modulep!` now takes multiple flags to simplify AND checks. E.g.

    (and (modulep! +foo)
         (modulep! +bar)
         (not (modulep! +baz)))

  Can now be expressed with:

    (modulep! +foo +bar -baz)
- Adds pcase matchers for `doom-module-context` and `doom-module`
  structs, making the following destructuring binds possible:

    (pcase-dolist ((doom-module group name flags features)
                   (hash-table-values doom-modules))
      ...)

  This will be used more in v3.0.
- Adds file cookie support to module init.el and config.el files.

Here's a summary of breaking changes made in this commit:

- `doom-module-context` was changed from a vector to a struct (record).
- `doom-modules` is now a table of `doom-module` structs, rather than
  free-form plists.
- The following macros have been renamed:
  - `doom-context-with` -> `with-doom-context`
  - `doom-module-context-with` -> `with-doom-module`
- The followings functions have been replaced/removed:
  - `doom-module-context`+`doom-module-context-get` -> `doom-module`
  - `doom-module-set` -> `doom-module--put`
  - `doom-module-p` -> `doom-module-active-p`
  - `doom-module-context-key` (is now a getter with the same name)
  - `doom-module-put` (removed)
  - `doom-module--context-field` (removed)
- The signatures for these functions have changed:
  - `doom-module-get CATEGORY &optional MODULE PROP` ->
    `doom-module-get (GROUP . MODULE) &optional PROP`
  - `doom-module-locate-path CATEGORY &optional MODULE FILE` ->
    `doom-module-locate-path (GROUP . MODULE) &optional FILE`
  - `doom-module-expand-path CATEGORY MODULE &optional FILE` ->
    `doom-module-expand-path (GROUP . MODULE) &optional FILE`
- Adds the following functions
  - `doom-module-exists-p`
  - `doom-module-key`
  - `doom-module->context`
  - `doom-module<-context`
- Removes the following variables
  - `doom-module--empty-context`

This commit results in a little redundancy, which I will address in
parts 2/3 and/or v3.0.
2024-10-20 02:41:42 -04:00
037b018cdd feat: add .doommodule files
These optional dotfiles indicate the root of a module or module
group (:lang), and will later contain module metadata. They will also
serve as an alternative to packages.el and doctor.el, and will aide the
parts of the v3.0 module API concerned with resolving the current module
from a path (`doom-module-from-path`), which currently rely too heavily
on parsing path strings.

For now, however, they're simply placeholders.
2024-09-14 20:47:39 -04:00
faeab956e5 fix(vertico): consult-register: make evil-aware
Since the module remaps evil-show-registers to consult-register, the
latter should be made aware of evil registers.

Fix: #6355
2024-09-13 23:07:14 -04:00
07afef645a tweak(company): company-idle-delay = 0.26
Bumped up from it's default of 0.2.
2024-09-13 23:07:14 -04:00
b9eb662334 feat(vertico): allow affixes to be escaped
So we can search for "modulep\!" without it triggering the ! dispatcher.
2024-09-13 23:07:14 -04:00
771fccc52b nit: minor reformatting & revision
Also corrects the version string of obsolete variable `+mu4e-backend`.
2024-09-11 19:46:14 -04:00
88a3961489 fix(company): company-backends not set in some buffers
Any buffers opened before company-mode was loaded would not have
`company-backends` initialized in them.

Fix: #6261
Fix: #6180
Fix: #5896
Fix: #5672
Fix: #2015
2024-09-10 23:34:20 -04:00
bd71e16cf4 bump: :completion corfu
minad/corfu@921dd7c97e -> minad/corfu@0a616caedf

Ref: minad/corfu@157b373abc
Fix: #7977
2024-09-04 15:04:21 -04:00
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
fb2f79033c fix(corfu): disable corfu-auto in evil replace mode
Ref: 63e9b11280
2024-09-01 14:49:04 -04:00
63e9b11280 feat(corfu): introduce +corfu-inhibit-auto-functions 2024-09-01 14:48:36 -04:00
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
10484dea87 merge: #7750
Close: #7750
2024-08-31 21:31:11 -04:00
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
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
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
4a4a9a1ada feat(corfu): add +corfu/toggle-auto-complete command 2024-08-28 22:26:47 -04:00
d6f5fed4a4 refactor(vertico): dabbrev-ignored-buffer-regexps: simplify 2024-08-26 02:22:53 -04:00
b9e460bc64 refactor(vertico): remove redundant quoting
Ref: #7943
2024-08-25 17:44:29 -04:00
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
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
5e2e886b35 nit: comment revision & reformatting 2024-08-15 23:18:47 -04:00
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
d3124c4971 nit: add deprecation comments for projectile config
Ref: doomemacs/core#1
2024-08-09 20:42:33 -04:00
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
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
b3ef202451 refactor(corfu): conform to naming conventions 2024-07-13 19:38:20 -04:00
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
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
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