Commit graph

19121 commits

Author SHA1 Message Date
Henrik Lissner
76845a2ea8
bump: :lang latex
emacs-straight/adaptive-wrap@dea4e32c18 -> emacs-straight/adaptive-wrap@f5bc153273
emacs-straight/auctex@764a53c8e9 -> emacs-straight/auctex@451b0f08b0

- Thankfully, emacs-straight/auctex@451b0f08b0 removed the make step
  for building tex-site.el, but it also meant that anyone who has
  unpinned auctex would get file-missing errors for tex-site.el.in.

Fix: #7925
Ref: emacs-straight/auctex@451b0f08b0
2024-07-11 23:14:14 -04:00
Henrik Lissner
20ee90614a
nit(cli): revise comment over site-run-file loader
To better explain to the wondering reader why we're loading site-start
here.
2024-07-11 21:53:38 -04:00
Henrik Lissner
12dc195774
fix: kill-current-buffer: respect kill-buffer-query-functions
This advice is intended to fake the death of buffers that are visible in
other windows, and prevent Emacs from switching to a non-real buffer
after it's killed/buried. It shouldn't even try to do any of this if
`kill-buffer-query-functions` fails, even if it is a fake death.
2024-07-11 15:22:12 -04:00
Henrik Lissner
3965df56e8
docs(org): +org--fix-inconsistent-uuidgen-case-a: link to bug report
For posterity.
2024-07-11 15:19:03 -04:00
Henrik Lissner
11cf61fef2
feat(org): display link at point in eldoc 2024-07-11 15:18:30 -04:00
Henrik Lissner
250f3a3899
feat(org): bind <localleader> l y to +org/yank-link
For copying the URL component of an org link at point.
2024-07-11 15:17:25 -04:00
Henrik Lissner
ba467fea57
bump: :tools lsp tree-sitter
emacs-lsp/lsp-mode@cec9e56390 -> emacs-lsp/lsp-mode@5298775517
emacs-straight/eglot@850cbd0430 -> emacs-straight/eglot@8008255edd
emacs-tree-sitter/tree-sitter-langs@a06804e13f -> emacs-tree-sitter/tree-sitter-langs@b2739d07fa
flycheck/flycheck-eglot@114e1315aa -> flycheck/flycheck-eglot@09e37f4c72
2024-07-11 15:16:09 -04:00
Henrik Lissner
86517122bd
bump: :core
Fuco1/smartparens@f7cf316715 -> Fuco1/smartparens@ab475c7891
emacs-compat/compat@80dbd9bc5e -> emacs-compat/compat@09dce8a193
emacs-straight/project@bf4c3cfcfb -> emacs-straight/project@093f42a1b6
jscheid/dtrt-indent@939c5e374a -> jscheid/dtrt-indent@339755e4fb
justbur/emacs-which-key@ed38931217 -> justbur/emacs-which-key@38d4308d11

Fix: #7939
2024-07-11 14:19:54 -04:00
ZenTauro
ef1aa5efe3
fix(ansible): void-function ansible error
`ansible` was renamed to `ansible-mode` upstream.

Amend: af2b1a62dc
Ref: eebb2fb49d
2024-07-11 14:18:35 -04:00
Henrik Lissner
c45318d493
nit(markdown): revise comments & reformat 2024-07-11 03:37:37 -04:00
Henrik Lissner
a6ba70aed7
fix(lib): avoid writing customized faces to custom.el (take 4)
This time, the faces weren't being applied if THEME == 'user (for
`custom-set-faces!`).

Amend: afb9773d7c
Ref: #7929
Ref: #7933
2024-07-11 03:18:48 -04:00
Henrik Lissner
c8b5bf7bd1
feat(flycheck): add +icons flag
Close: #7814
Co-authored-by: Dev380 <Dev380@users.noreply.github.com>
2024-07-10 20:35:30 -04:00
Henrik Lissner
778fc9ad3f
fix(vc-gutter): disable diff-hl-update-async in with-editor-mode
`diff-hl-update-async` was enabled in f2696d7, causing a regression
where with-editor buffers wouldn't get cleaned up properly. This would
particularly affect Magit's COMMIT_EDITMSG buffers. To quote jds on
Discord:

  It seems like after committing (with cc in the magit buffer), it
  leaves COMMIT_EDITMSG around. The next time I try & commit, a single c
  keypress immediately jumps to the old COMMIT_EDITMSG buffer, but it's
  inactive - C-c C-c closes that buffer but makes no change to git.

I opt for advice instead of find-file or with-editor-mode hooks to
restore normal behavior should with-editor-mode be later disabled
without the death of its buffer (not relevant to magit, specifically,
but it might be to other consumers of with-editor, now or in the
future).

Ref: dgutov/diff-hl#213
Amend: f2696d7302
2024-07-10 18:27:54 -04:00
Henrik Lissner
c2c241666b
fix(lib): autoload doom--run-customize-theme-hook
In case the user byte-compiles any files where custom-theme-set-faces!
is used.

Amend: afb9773d7c
Ref: #7929
Ref: #7933
2024-07-10 16:00:16 -04:00
Henrik Lissner
afb9773d7c
fix(lib): avoid writing customized faces to custom.el (take 3)
Wrap doom-customize-theme-hook and use that wrapper also when the local
doom--customize-themes-h-* hook is called immediately, otherwise
settings will be written to custom-file, which is what I've been trying
to avoid with all these takes!

Amend: 0b13525252
Ref: #7929
Close: #7933
Co-authored-by: real-or-random <real-or-random@users.noreply.github.com>
2024-07-10 15:57:35 -04:00
Henrik Lissner
0b13525252
fix(lib): avoid writing customized faces to custom.el (take 2)
Setting custom--inhibit-theme-enable to t isn't enough, since
custom--should-apply-setting will return non-nil if THEME is 'user.

Ref: #7929
Amend: 68771150ba
2024-07-10 04:22:48 -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
f1f72c291a
refactor(vc-gutter): simplify & DRY
These advice were unnecessary when not only does diff-hl expose
variables to change them, but one of the overridden definitions is
identical to the function it's replacing.

Also includes some other minor refactors.
2024-07-10 03:54:45 -04:00
Henrik Lissner
78304f4d79
perf(vc-gutter): optimize bitmaps
The NS build of Emacs (on MacOS) seems to struggle rendering our old
fringe bitmaps for diff-hl, leading to noticably slow-downs when
scrolling in buffers with diff-hl enabled. By pre-computing the pixel
height and width of the bitmap, rather than relying on passing `repeat`
to define-fringe-bitmap's ALIGN argument, this seems to spare it a chunk
of wasted cycles.

Ref: https://www.reddit.com/r/emacs/comments/1do1wgj/fringes_incredibly_slow_on_emacs_ns_with_macos/
Fix: #7923
2024-07-10 03:18:46 -04:00
Henrik Lissner
df5f6696ec
tweak(markdown): fontify code blocks natively
Enable `markdown-fontify-code-blocks-natively`, which was disabled in
f5570db due to performance issues, which I try to fix by suppressing
mode hooks on `markdown-fontify-code-block-natively`.

Amend: f5570db4c2
Close: #7930
Co-authored-by: real-or-random <real-or-random@users.noreply.github.com>
2024-07-10 01:47:18 -04:00
Henrik Lissner
68771150ba
fix(lib): avoid writing customized faces to custom.el
`custom-theme-set-faces!` calls `custom-theme-set-faces`, which will
mark the customizations for saving to custom.el. But
`custom-theme-set-faces!` is not intended for permanent customizations.
I fix this by setting `custom--inhibit-theme-enable` to prevent some of
the extra work `custom-theme-set-faces` does around changing faces, and
call face-spec-set manually.

Also renames doom--custome-theme-set-face to doom--normalize-face-space,
to better reflect what it does.

Close: #7929
Co-authored-by: real-or-random <real-or-random@users.noreply.github.com>
2024-07-10 01:46:57 -04:00
Tim Ruffing
b4b1b48e26 nit(org): update outdated comment
Amend: b0e16dc243
2024-07-10 01:45:59 -04:00
Tim Ruffing
16b243733b fix(org): restart org in all optimized buffers
Fix: #7737
2024-07-10 01:45:59 -04:00
Henrik Lissner
9d7885abbf
fix(evil): q/Q keybinds in view-mode
Caused by evil-collection-view binding q to quit-window, which breaks
view-exit-action. This should be reported upstream.
2024-07-10 01:16:29 -04:00
Henrik Lissner
fe0548e820
tweak: unbind SPC in y-or-n-p prompts
SPC is equivalent to y when y-or-n-p prompts you, which seems way too
easy to hit by accident, especially with our leader key being (or
involving) SPC by default.
2024-07-09 21:53:50 -04:00
Henrik Lissner
a4869f32e7
refactor(org): org-src-lang-modes: move md alias
This is a general convenience for org users, not specifically for users
of the markdown module, so it belongs in :lang org.
2024-07-09 20:59:53 -04:00
Henrik Lissner
8bd6b8ab68
perf: suppress local-vars hooks in temp buffers
Doom inserts some expensive hooks in MODE-local-vars-hook, like
triggering LSP servers, tree-sitter, or visual enhancements -- things
that are unnecessary in temporary (invisible) buffers, so I suppress
them altogether there.
2024-07-09 20:56:35 -04:00
Henrik Lissner
e43d575caf
refactor(lib): don't use smartparens' API
Toward our eventual goal of moving smartparens out of core, I've adapted
this from code provided by hpfr on Discord, which was adapted from
smartparen's syntax-ppss caching logic. `:config default` will need need
some attention before we can fully move smartparens to its own `:editor
smartparens` module.

Co-authored-by: hpfr <hpfr@users.noreply.github.com>
2024-07-09 20:55:29 -04:00
Henrik Lissner
1131d5b36d
refactor(org): remove +org--recenter-after-follow-link-a
Since I changed `scroll-conservatively` in f427c8a, this is no longer
necessary.

Amend: f427c8a30e
2024-07-09 19:16:29 -04:00
Henrik Lissner
944eef90ec
fix(lib): doom-plist-merge causing side-effects
This one was sneaky. `doom-plist-merge` was mutating the second plist
fed to it, causing issues upwind of its uses. In #7925, for example,
calling `doom-package-recipe` to read a package's recipe would end up
altering it, copying sub-properties of :recipe to other packages'
recipes.

If you've hit #7925, you'll also need to delete your build-cache to get
around the error. I.e.

  rm -f $EMACSDIR/.local/straight/build-*-cache.el
  doom sync  # or upgrade

Fix: #7925
2024-07-09 02:46:53 -04:00
Henrik Lissner
96de02c769
fix(latex): auctex: build tex-site.el
Auctex added a make build step to it's installation. Rather than just
assume the user has the GNU variants of make, sed, and other unix
utilities on their system, I simply generate tex-site.el in elisp,
similar to what we do with org and its org-version.el and
org-loaddefs.el files.

This is a stop-gap measure until I've deployed a mirror+CD on @doomelpa.
2024-07-09 00:40:16 -04:00
Henrik Lissner
f2696d7302
perf(vc-gutter): diff-hl-update-async = t
Don't block Emacs when updating the gutter.

Ref: #7923
2024-07-08 22:16:05 -04:00
Eloise Christian
081231b73f fix(format): apheleia doesn't invoke lsp formatter
change `+format--lsp-fn` to run `+format--lsp-fn` in context of main
buffer rather than apheleia's scratch buffer so that the lsp mode can
be discovered
2024-07-08 21:41:39 -04:00
Mohammed Abdel Raouf
af2b1a62dc
bump: :tools ansible
bump: :tools ansible

emacs-ansible/emacs-ansible@b4dca00f89 -> https://gitlab.com/emacs-ansible/emacs-ansible@eebb2fb49d3c

- (#7922) Updates emacs-ansible's pin so it is properly cloned from it's new
  home at gitlab.
2024-07-08 19:31:05 -04:00
Henrik Lissner
21a252d994
bump!: :lang latex
emacs-straight/auctex@280cd4a0ca -> emacs-straight/auctex@764a53c8e9
emacs-straight/adaptive-wrap@a3b179ea21 -> emacs-straight/adaptive-wrap@dea4e32c18

BREAKING CHANGE: This commit also removes the +latexmk flag from the
`:lang latex` module, since the auctex-latexmk package is no longer
needed (support has been upstreamed into auctex). This means the module
won't set `TeX-command-default` to "LaTeXMk" for you anymore; you'll
have to do it yourself, e.g. (note the capitalization!)

  (setq TeX-command-default "laTeXMk")
  ;; or
  (setq-hook! LaTeX-mode TeX-command-default "LaTeXMk")

Ref: https://git.savannah.gnu.org/cgit/auctex.git/commit/?id=4a345e2234df74f1ad98046ef1372f7ca6fb357d
2024-07-08 13:59:16 -04:00
Henrik Lissner
dfe9d572a7
docs(format): hacks: mention save-buffer advice 2024-07-08 13:59:16 -04:00
Henrik Lissner
7d25ba3f6c
fix(format): void function +format-with-lsp-maybe-h error
Regression introduced in fd1941b.

Amend: fd1941b95f
2024-07-08 13:59:06 -04:00
Keenan Sanchez
6e19452f74
fix(python): missing labels for keybind prefixes
Use the `(PREFIX . DESCRIPTION)` syntax for the python mode map.
2024-07-08 01:33:28 -04:00
Henrik Lissner
6b526b1b47
refactor(format): +format/org-block: make arg optional 2024-07-07 21:48:17 -04:00
Henrik Lissner
f104f10c5b
docs(format): revise README.org
To reflect recent changes and for clarity.
2024-07-07 21:48:17 -04:00
Henrik Lissner
fd1941b95f
refactor!(format): simplify & gate lsp/eglot impl behind +lsp
BREAKING CHANGE: This commit introduces two changes, a breaking, one
not.

The breaking change: `+format-with-lsp` used to control lsp-mode/eglot
integration for this module, but it is now gated behind a new +lsp flag.
Users will need to add it to their `doom!` blocks (in $DOOMDIR/init.el)
to restore the integration.

The other change: I've merged the former `lsp` and `eglot` formatters
into a single `lsp` formatter that dispatches to the appropriate
backend, as well as wrapping this integration in a
`+format-with-lsp-mode` minor mode, so it can be toggled at will; mainly
to assist in debugging formatter behavior.

A unified formatter makes it easier for folks to configure
`+format-with` on a per-project/directory/file basis, without needing to
know what backend this module uses, and opens us up to integrating other
LSP backends in the future (like lsp-bridge).
2024-07-07 21:43:27 -04:00
Henrik Lissner
cca40c0277
tweak(format): doom-debug-variables: add apheleia-log-debug-info 2024-07-07 21:43:27 -04:00
Henrik Lissner
d648bfda40
docs(format): revise docstrings and comments 2024-07-07 20:41:03 -04:00
Henrik Lissner
9224ac56f0
tweak(default): bind '<leader> g U' to magit-unstage-buffer-file
The former command, magit-unstable-file, would prompt the user to select
a file to unstage, but the intention of this keybind was always to
"unstage *this* file". magit-unstage-buffer-file didn't exist at the
time this keybind was created, so I settled on magit-unstage-file as a
compromise, which is no longer necessary.
2024-07-07 20:39:32 -04:00
Henrik Lissner
c5c7f0bc99
feat(format): add +format-inhibit alias
I want both `apheleia-formatter` and `apheleia-inhibit` exposed for easy
setting from directory/file-local variables (like .dir-locals.el), but
I'd like to abstract away the implementation (Apheleia) a little, hence
these aliases. This way, whether or not we're still using Apheleia in a
year or three, `+format-with` and `+format-inhibit` should always work.
2024-07-07 16:31:24 -04:00
Henrik Lissner
5e78ed0911
refactor(format): use eglot-server-capable
eglot--server-capable was deprecated.
2024-07-07 14:39:50 -04:00
Henrik Lissner
deb59ca4ad
fix(format): LSP formatters before Apheleia is loaded 2024-07-07 14:39:27 -04:00
Henrik Lissner
c45c8cee35
tweak(beancount): +beancount/balance w/ prefix arg
Without the prefix arg, it will only display the balance of Assets and
Liabilities.  With it, the balance of all accounts will be shown.
2024-07-07 14:38:21 -04:00
Chris Rose
a99863a76f
bump: :tools magit
magit/forge@4adb94d23c -> magit/forge@0102834bb7
magit/magit@ea0f07e549 -> magit/magit@9d1f8db507

- Includes an update for forge to accommodate changes to closql's interface.

Ref: magit/forge@fb272bd93b
2024-07-07 14:35:40 -04:00