Commit graph

19166 commits

Author SHA1 Message Date
Henrik Lissner
90f90fb34d
fix(treemacs): simplify lsp-treemacs load-order
dec058f fixed the load order between treemacs-nerd-icons and
lsp-treemacs, but lsp-treemacs still loads so late that folks will see a
theme-less Treemacs until they visit their first lsp-mode-enabled file.
This ensures that won't happen.

Amend: dec058fabb
Amend: #7519
2024-03-13 01:00:38 -04:00
cuithon
f838c1790d
docs(default,mu4e,latex): fix repetition of the in docs 2024-03-12 20:16:29 -04:00
Luigi Sartor Piucco
600ebf8b01
docs(corfu): add @LemonBreezes as co-maintainer
Co-authored-by: StrawberryTea <look@strawberrytea.xyz>
2024-03-12 18:18:34 -03:00
Luigi Sartor Piucco
9e7967c909
refactor(corfu): settings and keybinding overhaul
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.
2024-03-12 18:18:33 -03:00
StrawberryTea
3aa1ea74d9
feat(corfu): make minibuffer completion optional 2024-03-12 18:18:33 -03:00
StrawberryTea
5ea726cfe4
feat(config): modify smart-ret in +tng minibuffer
If we are using +tng, we can make RET always exit the minibuffer. This
has the downside of not being able to insert snippets, but no one writes
snippets for the minibuffer anyway.
2024-03-12 18:18:33 -03:00
StrawberryTea
89a30df0c4
fix(corfu): eval lambdas 2024-03-12 18:18:33 -03:00
StrawberryTea
d0127025a0
fix(corfu): improve detection of comments
Due to https://github.com/minad/cape/pull/109, we cannot rely on only
faces to detect comments.
2024-03-12 18:18:33 -03:00
StrawberryTea
b96778497b
fix(corfu): use :filter instead of :enable 2024-03-12 18:18:32 -03:00
StrawberryTea
a1ba1593fc
fix(corfu): complete after colon in lispy 2024-03-12 18:18:32 -03:00
StrawberryTea
14f350a3da
fix(corfu): move orderless conf out of corfu block 2024-03-12 18:18:32 -03:00
StrawberryTea
16c4daee52
feat(config): add smart-ret for corfu
This commit makes RET in Corfu quit auto-completion and passthrough to
the underlying keymap if no completion is selected.
2024-03-12 18:18:32 -03:00
StrawberryTea
881c45bd05
doc(corfu): document +corfu-want-C-x-bindings 2024-03-12 18:18:32 -03:00
StrawberryTea
d25e15072d
fix(corfu): bind tng tab commands to insert state
These commands were being shadowed by the other Corfu commands
previously.
2024-03-12 18:18:31 -03:00
StrawberryTea
fa1979d97f
feat(config): make C-x corfu bindings optional
For someone like me that uses the vanilla emacs commands bound to C-x
C-p, C-x C-n, etc, I prefer to set the completion keybindings manually.
2024-03-12 18:18:31 -03:00
StrawberryTea
42f48ace69
fix(corfu): bind cape-dabbrev eagerly
Set up cape-dabbrev in completion-at-point-functions before dabbrev is
loaded.
2024-03-12 18:18:31 -03:00
StrawberryTea
f3729174bd
feat(corfu): update minibuffer hints manually
In the scenario where we exit the minibuffer using C-RET or S-RET, we
need this advice to ensure that visual hints are updated before exiting.
2024-03-12 18:18:31 -03:00
StrawberryTea
0ea6968f74
refactor(corfu): unwrap add-hook from after! block
add-hook handles void variables so there is no need to wrap it in an
after! block. This also makes it easier for the user to remove the hook.
2024-03-12 18:18:31 -03:00
StrawberryTea
b54c64bc21
fix(corfu): load minibuffer-setup-hook earlier
This way Corfu can be lazily-loaded by the minibuffer-setup-hook.
2024-03-12 18:18:31 -03:00
Luigi Sartor Piucco
a2e76be3a9
bump: :completion corfu
minad/corfu@24dccafeea -> minad/corfu@b48d3017a4
minad/cape@18a30f48bb -> minad/cape@bfde79ed44
elken/yasnippet-capf@a0a6b1c2bb -> elken/yasnippet-capf@db12b55cd0
2024-03-12 18:18:30 -03:00
Luigi Sartor Piucco
956b85310c
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.
2024-03-12 18:18:30 -03:00
Luigi Sartor Piucco
d666dcd713
feat(corfu): impl smart confirm in minibuffer
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.
2024-03-12 18:18:30 -03:00
Luigi Sartor Piucco
7bbef94854
fix(corfu): move binds to :config default
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.
2024-03-12 18:18:30 -03:00
Luigi Sartor Piucco
8ef4ce6311
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-12 18:18:30 -03:00
StrawberryTea
948f2b7705
feat(corfu): more CAPFs and ergonomy changes
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.
2024-03-12 18:18:29 -03:00
Luigi Sartor Piucco
8ed223c98e
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-12 18:18:29 -03:00
Luigi Sartor Piucco
5532c68e53
module: add :completion corfu
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;
2024-03-12 18:18:29 -03:00
16148ead05 dev: updating from latest 2024-03-11 13:08:02 -04:00
StrawberryTea
a0344ffc3a
fix(mu4e): advice for new mu4e release
mu4e-quit now takes an optional argument, BURY, which is a boolean that
determines whether to bury the buffer or kill it. This commit updates
the advice to reflect this change.
2024-03-11 04:01:48 -04:00
Henrik Lissner
b382255704
release(modules): 24.03.0-dev
Ref: 2b39e41368
2024-03-11 03:59:38 -04:00
Henrik Lissner
68682ac012
fix(ruby): ruby REPL w/ robe
set-repl-handler! handlers have to return a buffer.

Close: #7450
Co-authored-by: Zetagon <Zetagon@users.noreply.github.com>
2024-03-11 03:59:37 -04:00
Henrik Lissner
1db96a1fdb
docs(web): correct type, mention JS comment hack, remove superfluous notice
close: #7388
2024-03-11 03:59:37 -04:00
Henrik Lissner
a0a1babc0d
fix(cli): silence output from site-lisp
Some site files will forcibly undo `inhibit-message` or set
`force-load-messages`. This ensures site lisp files don't make
unnecessary noise at startup.
2024-03-11 03:59:37 -04:00
Henrik Lissner
559171575e
refactor(lib): doom-region-end: extract marker 2024-03-11 03:59:37 -04:00
Henrik Lissner
61327bf777
refactor(lib): use doom-region-{beginning,end} 2024-03-11 03:59:37 -04:00
Henrik Lissner
4be265ead7
fix: doom-incremental-first-idle-timer: type error when nil (part 2)
Amend: 2bce9dbc1a
Ref: #7710
2024-03-11 03:59:37 -04:00
Tim Ruffing
e27d9b35d3 fix(popup): fix finding of major side window
Fix: #7647
Amend: #7598
2024-03-11 02:55:38 -04:00
Henrik Lissner
c6063de439
nit: revise and reformat comments 2024-03-11 00:53:44 -04:00
Henrik Lissner
7f484f7010
refactor: remove explain-pause-mode
Tools like these will be moved to a benchmark module later (or perhaps
to `:lang emacs-lisp`). For the time being, it only takes up extra space
that few users use.
2024-03-11 00:53:44 -04:00
Henrik Lissner
6c1aa0fb62
bump: :tools editorconfig
editorconfig/editorconfig-emacs@4b81a59928 -> editorconfig/editorconfig-emacs@c3666c093f
2024-03-11 00:53:44 -04:00
Henrik Lissner
dec058fabb
fix(treemacs): treemacs-nerd-icons load order w/ +lsp
lsp-treemacs changes the default Treemacs theme, so treemacs-nerd-icons
needs to be loaded after it, if it's installed/enabled.

Fix: #7519
Fix: doomemacs/themes#801
Ref: emacs-lsp/lsp-treemacs#89
2024-03-11 00:53:44 -04:00
Henrik Lissner
41e81f67a7
refactor(editorconfig): remove unused advice
editorconfig-call-editorconfig-exec was renamed+redesigned upstream. The
advice can no longer be trivially repurposed, so I'm removing it.

Ref: editorconfig/editorconfig-emacs@f8f1a899df
2024-03-11 00:53:44 -04:00
Henrik Lissner
43870bf831
fix(editorconfig): prevent changes to tab-width in org-mode
- Add another measure for preventing changes to tab-width in org-mode.
  The hook introduced in 2757a97 runs too early and could be overwritten
  by editorconfig.
- Fix the hook in 2757a97 to run much later, ensuring (as a last resort)
  no other packages can overwrite tab-width either.

Amend: 2757a97a30
Ref: #7670
2024-03-11 00:53:44 -04:00
Henrik Lissner
198fe82b6d
feat(lib): backport find-sibling-file
I will slowly phase out projectile in favor of project.el, starting with
projectile-find-other-file, which -- as of Emacs 29 -- has a native
alternative: `find-sibling-file`.

Ref: doomemacs/community#1
2024-03-11 00:53:44 -04:00
Henrik Lissner
3b405c8d81
fix(lib): only use alpha-background on pgtk builds
Fix: #7721
2024-03-11 00:53:44 -04:00
Henrik Lissner
3820ead9e3
tweak(markdown): disable wiki links & math highlights by default
These two features are relatively expensive and shouldn't be enabled as
a global default.
2024-03-11 00:53:44 -04:00
Henrik Lissner
f1c1efe420
refactor(biblio): move 3rd party modes to use-package blocks
This makes load-order more predictable for users wanting to modify the
side-effects of citar-org-roam-mode or citar-embark-mode. I.e.

  (after! citar-org-roam ...)
  (after! citar-embark ...)

Instead of:

  (after! (citar org-roam) ...)
  (after! (citar embark) ...)

Ref: #7712
Co-authored-by: hpfr <hpfr@users.noreply.github.com>
2024-03-11 00:53:43 -04:00
Henrik Lissner
2bce9dbc1a
fix: doom-incremental-first-idle-timer: type error when nil
If the user uses the doom-load-packages-incrementally function directly,
and has set doom-incremental-first-idle-timer set to nil, it will throw
a type error.

Close: #7710
2024-03-11 00:53:43 -04:00
Henrik Lissner
d443488728
bump: :lang nim
nim-lang/nim-mode@1338e5b0d5 -> nim-lang/nim-mode@625cc023bd
2024-03-11 00:53:43 -04:00
Henrik Lissner
79429ecc56
fix(nim): swap nimfmt with nimpretty
Nim 2.x+ comes with its own formatter (nimpretty).

Close: #7578
Co-authored-by: pietrangelo <pietrangelo@users.noreply.github.com>
2024-03-11 00:53:43 -04:00