Commit graph

12298 commits

Author SHA1 Message Date
Henrik Lissner
b0e1e68e78
fix(cc): disable modern-cpp-font-lock if +tree-sitter
Fix: #7941
2024-07-11 23:32:05 -04:00
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
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
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
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
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
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
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
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
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
jman-schief
3cd605182f
fix(mu4e): remove stray +workspace-delete invokation
In commit 5289861109 `+workspace-delete` was
replaced by `+workspace-kill`.

The changes were not complete, though, and mu4e does not start anymore.

This patch completes the changes and should restore mu4e.

Amend: 5289861109
2024-07-07 13:37:02 -04:00
Henrik Lissner
21a427c33b
fix(format): eglot-managed{,-mode}-hook hook 2024-07-06 21:18:34 -04:00
Henrik Lissner
17d4aaace3
fix(format): add lsp functions
Forgot to include these functions in 8072762. Oops.

Amend: 8072762de8
2024-07-06 21:03:12 -04:00
Henrik Lissner
4e795c3a55
tweak(org): use consult-outline instead of imenu
Ref: #7716
2024-07-06 20:40:08 -04:00
Ellis Kenyő
d330642c2e
feat(literate): add +literate/find-heading command
A command for jumping to an Org heading in your literate org config
file.

Close: #7716
2024-07-06 20:40:08 -04:00
Henrik Lissner
cc358a60c4
refactor(org): remove unused hooks
These hooks had the potential to be too expensive (in larger Org files)
to be enabled by default.
2024-07-06 20:07:14 -04:00
Henrik Lissner
f6e65c4010
feat(org): add +org/reformat-at-point command
A DWIM command to reformat a src block, table, or paragraph at point.

Ref: #7685
2024-07-06 19:58:27 -04:00
Henrik Lissner
8072762de8
refactor(format): redesign module
Rather than wrap Apheleia in custom formatting logic, I now use
Apheleia's own machinary to integrate into LSP and Eglot, which is less
complexity to maintain. It also makes settings +format-with a more
reliable option for per-project or per-file configuration.

This also adds a +format/org-src-block command, which I'll incorporate
into the org module in a follow-up commit.

Ref: #7685
2024-07-06 19:54:55 -04:00
Henrik Lissner
b0e16dc243
fix(org): reload org-mode in half-loaded capture buffers
Fix: #5411
2024-07-05 20:10:58 -04:00
Henrik Lissner
7bb5df4cd4
fix(zig): update zls download URL
Fix: #7873
Ref: zigtools/zls#1879
2024-07-05 20:10:58 -04:00