Commit graph

18908 commits

Author SHA1 Message Date
StrawberryTea
e574d2d711
feat(corfu): update minibuffer hints manually
We need this advice to ensure that visual hints are updated before
exiting.
2024-05-21 17:16:58 +02:00
StrawberryTea
2088c6fc27
feat(corfu): make minibuffer completion optional 2024-05-21 17:16:58 +02:00
Luigi Sartor Piucco
d44d8d94ea
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-05-21 17:16:57 +02:00
Luigi Sartor Piucco
ae4ce38779
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-05-21 17:16:57 +02:00
StrawberryTea
ca68e0cdee
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-05-21 17:16:57 +02:00
Luigi Sartor Piucco
a980695939
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-05-21 17:16:57 +02:00
Luigi Sartor Piucco
1b6e77c664
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-05-21 17:16:57 +02:00
Sean Farley
564264720c
bump: :tools magit
magit/forge@03b48be2a1 -> magit/forge@03b48be2a1
magit/magit@65ecb9c5fc -> magit/magit@65ecb9c5fc

This fixes a bug in forge (which has been fixed upstream) that
erroneously set `minibuffer-allow-text-properties' globally and caused
seemingly random errors involving completion from the minibuffer.

Ref: magit/forge#639
Ref: minad/jinx#140
2024-05-21 17:16:57 +02:00
Henrik Lissner
161da1415b
fix: invoke debugger for early-init.el-level errors 2024-05-21 17:16:57 +02:00
Henrik Lissner
f62a1f640b
refactor: inline doom--make-font-specs
This function isn't (and won't be) used anywhere else. No reason for it
to be its own function.
2024-05-21 17:16:56 +02:00
Henrik Lissner
1aaaf9b851
refactor: consolidate startup--load-user-init-file advice
Splitting up all this advice was unnecessary noise.
2024-05-21 17:16:56 +02:00
Henrik Lissner
aedf2a194f
fix: shut up site-lisp
One various OSes, Emacs ships with site-lisp files that load
OS/architecture-specific config (like native-comp config), or load-lines
for Emacs packages installed via your OS package manager (like mu4e).
Output from these are rarely suppressed, for some reason, which causes
noise in *Messages* at startup, which triggers a redraw, which can be
very expensive during startup, depending on your window system.
2024-05-21 17:16:56 +02:00
Henrik Lissner
4997015ac7
fix: ensure inhibit-* is reset on startup error 2024-05-21 17:16:56 +02:00
Henrik Lissner
767ec85417
fix(eval): overlay position
Fix: #7732
Close: #7734
Co-authored-by: pysnow530 <pysnow530@users.noreply.github.com>
2024-05-21 17:16:56 +02:00
Henrik Lissner
ede4449a48
fix(java): add lsp-treemacs
lsp-java depends on lsp-treemacs without declaring it a dependency, so
lsp-users using :lang (java +lsp) users without :ui (treemacs +lsp) will
experience file-missing errors when lsp-java is loaded.
2024-05-21 17:16:56 +02:00
Sean Farley
56dd3e592f
feat(macos): osx-trash is only needed by emacs < 29 2024-05-21 17:16:56 +02:00
Henrik Lissner
9658b06260
fix: tiny fonts in (daemon) GUI frames
Due to a suppressed void-variable error, font initialization is
short-circuited across daemon frames when the fonts are reloaded or
changed (which is also triggered by changing themes), resulting in
malformed (often tiny) fonts in GUI frames.

Fix: #7730
2024-05-21 17:16:55 +02:00
Henrik Lissner
838abb787e
fix(lsp): void-variable eglot-events-buffer-config
The variable was modified too early (before the package was loaded).

Amend: 5f858bb142cc
2024-05-21 17:16:55 +02:00
Henrik Lissner
b6e48e2046
fix(lsp): s/eglot-events-buffer-size/eglot-events-buffer-config/
Amend: 5f858bb142cc
2024-05-21 17:16:55 +02:00
Henrik Lissner
22955b1d49
docs(twitter): add deprecation notice
twittering-mode is non-functional and no known alternative exists.

Close: #6383
2024-05-21 17:16:55 +02:00
Henrik Lissner
8fccb94680
fix(org): only reveal point on save-place-after-find-file-hook
Prior to this change, whenever you enter an org-mode buffer, any
invisible regions around the cursor (which had been moved by save-place)
would be unfolded unconditionally. There may be cases where moving
the cursor immediately after visiting the file could cause errors (e.g.
when yasnippet tries to wrestle control over the cursor,
org-agenda-switch-to moves the cursor before switching to the buffer,
etc).

This change ensures the expansion *only* happens when save-place does
its thing (and successfully).
2024-05-21 17:16:55 +02:00
Henrik Lissner
88cfbf8307
fix: save-place: don't move point more than once
In some contexts, like org-agenda-switch-to visiting a TODO in an agenda
file, the visiting command will move the cursor after opening the file.
If save-place moves the cursor yet again, the cursor will end up in an
unpredictable place.
2024-05-21 17:16:55 +02:00
Henrik Lissner
40e9a17160
fix(format): +format-with-eglot-fn: eglot detection 2024-05-21 17:16:55 +02:00
Henrik Lissner
c0a46b3bc4
refactor(lsp): obsolete eglot-events-buffer-size
Ref: 88c46bd4db
2024-05-21 17:16:54 +02:00
Henrik Lissner
f5156be684
fix(emacs-lisp): +emacs-lisp--module-at-point: wrong-number-of-arguments error 2024-05-21 17:16:54 +02:00
Henrik Lissner
1a8afbb4ff
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: dec058fabb5e
Amend: #7519
2024-05-21 17:16:54 +02:00
cuithon
c068f59bd0
docs(default,mu4e,latex): fix repetition of the in docs 2024-05-21 17:16:54 +02:00
StrawberryTea
05dc179b96
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-05-21 17:16:54 +02:00
Henrik Lissner
22309ad240
release(modules): 24.03.0-dev
Ref: 2b39e41368
2024-05-21 17:16:54 +02:00
Henrik Lissner
f493992142
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-05-21 17:16:54 +02:00
Henrik Lissner
8fe39e333c
docs(web): correct type, mention JS comment hack, remove superfluous notice
close: #7388
2024-05-21 17:16:53 +02:00
Henrik Lissner
73bfaf7122
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-05-21 17:16:53 +02:00
Henrik Lissner
9f2071808b
refactor(lib): doom-region-end: extract marker 2024-05-21 17:16:53 +02:00
Henrik Lissner
0197991038
refactor(lib): use doom-region-{beginning,end} 2024-05-21 17:16:53 +02:00
Henrik Lissner
316a6f0746
fix: doom-incremental-first-idle-timer: type error when nil (part 2)
Amend: 2bce9dbc1ad1
Ref: #7710
2024-05-21 17:16:53 +02:00
Tim Ruffing
00b5b62bca
fix(popup): fix finding of major side window
Fix: #7647
Amend: #7598
2024-05-21 17:16:53 +02:00
Henrik Lissner
d4c3b12390
nit: revise and reformat comments 2024-05-21 17:16:52 +02:00
Henrik Lissner
87c33db473
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-05-21 17:16:52 +02:00
Henrik Lissner
da0ae0d42f
bump: :tools editorconfig
editorconfig/editorconfig-emacs@4b81a59928 -> editorconfig/editorconfig-emacs@c3666c093f
2024-05-21 17:16:52 +02:00
Henrik Lissner
c5a20aaf1b
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-05-21 17:16:52 +02:00
Henrik Lissner
c2432ab139
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-05-21 17:16:52 +02:00
Henrik Lissner
8d9e0e8e23
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: 2757a97a30e7
Ref: #7670
2024-05-21 17:16:52 +02:00
Henrik Lissner
51dcf7da6a
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-05-21 17:16:52 +02:00
Henrik Lissner
29fc1dfd6d
fix(lib): only use alpha-background on pgtk builds
Fix: #7721
2024-05-21 17:16:51 +02:00
Henrik Lissner
9c75a69696
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-05-21 17:16:51 +02:00
Henrik Lissner
cbd18bd6d7
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-05-21 17:16:51 +02:00
Henrik Lissner
5fb7dd6dfa
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-05-21 17:16:51 +02:00
Henrik Lissner
1cf2f2d52d
bump: :lang nim
nim-lang/nim-mode@1338e5b0d5 -> nim-lang/nim-mode@625cc023bd
2024-05-21 17:16:51 +02:00
Henrik Lissner
4559a61d2c
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-05-21 17:16:51 +02:00
minh
e986f4769b
feat(java): java.el takes java-ts-mode into account
allow +java-current-package and +java-current-class functions to operate
on java-ts-mode (the java tree-sitter mode) not just java-mode.
2024-05-21 17:16:51 +02:00