Commit Graph

1598 Commits

Author SHA1 Message Date
Henrik Lissner
94a1fe64a8 fix(tree-sitter): suppress "Can't find grammar" warnings
In Emacs <=30, top-level `treesit-ready-p` calls in various *-ts-mode
packages (like lua-ts-mode or ruby-ts-mode) are commonplace, and they
throw up a warning popup if the grammar isn't available at load time.
This is intrusive. Instead, this forces it to log to *Messages* instead
before falling back to the normal major mode.

Fortunately, these top-level `treesit-ready-p` calls have been removed
in most *-ts-mode packages in 31+, but this still impacts users on <=30
or using third party *-ts-modes that haven't adapted.

However, this doesn't suppress the warning when opening a *-ts-mode.el
file (thanks to the byte-compiler).
2025-08-31 14:41:40 +02:00
Henrik Lissner
d545fccf47 fix(:lang): missing grammar recipes
I removed the grammar recipes in 3b58741 to avoid redundancy with the
upstream recipes, but didn't realize that those upstream recipes weren't
added until Emacs 31, so users on 30 and older would get errors when
trying to install any missing grammars.

This also establishes a hard dependency between :lang (php +tree-sitter)
and :lang ({javascript,web} +tree-sitter).

Amend: 3b58741522
2025-08-31 14:39:38 +02:00
Henrik Lissner
d9fd5cb8f3 fix(tree-sitter): treesit-enabled-modes: sort arity in <30
`sort`s signature changed in Emacs 30 from:

  (sort SEQ PREDICATE)

To

  (sort SEQ &key KEY LESSP REVERSE IN-PLACE)

Amend: 6009c2b838
2025-08-31 14:34:45 +02:00
Henrik Lissner
7dcedc16b5 refactor(tree-sitter): major mode remapping
This approach simplifies the hacks and uses fewer moving parts to be
less error prone (or prone to potentially overwriting user/module
configuration).
2025-08-30 09:41:25 +02:00
Henrik Lissner
702d976665 docs(tree-sitter): document module hacks 2025-08-29 14:37:10 +02:00
Henrik Lissner
cd5dd5279e fix(tree-sitter): major mode remapping on first-load
Also refactors +tree-sitter--major-mode-remaps-alist to be lighter.
2025-08-29 14:35:49 +02:00
Henrik Lissner
bd0bee92cc feat!(javascript): add treesit support
BREAKING CHANGE: This commit removes a number of core packages and
features from this module and only replaces a handful of them, so that
we can lean more on LSP and tree-sitter. To be specific:

- We used to rely on `rjsx-mode` (derived from js2-mode) for total
  JS/JSX support (though imperfect; Emacs was starved for options at the
  time). This has now been replaced with `js-ts-mode` (built-in after
  Emacs 29), falling back to `js-mode` (very rudimentary, but a decent
  fallback).
- This also meant the removal of `js2-mode`, which `skewer-mode`,
  `js2-refactor`, and `xref-js2` depended on, so those were removed
  too, and have *somewhat* been replaced with LSP integration (offers
  jump-to-definition/references and *some* refactoring actions, but no
  replacement for skewer's functionality).
- Typescript support no longer relies on the jury-rigged, web-mode-derived
  major mode (because TSX support in the upstream `typescript-mode`
  isn't great). We now use `typescript-ts-mode` (built-in into Emacs
  29.1+), falling back to `typescript-mode`.
- JSX/TSX support now *requires* tree-sitter (and Emacs 29.1+), where
  `tsx-ts-mode` is available and outshines all the alternatives (at the
  time of writing).

Due to the absolute chaos that is webdev, this module sacrifices some of
the graceful-degradation I've implemented for other modules and creates
a hard requirement on tree-sitter and Emacs 29.1+ for JSX/TSX. It still
tries to degrade gracefully for plain JS and TS, but the module's doctor
and docs will actively recommend tree-sitter.

Close: #5278
Fix: #6172
Fix: #7042
Close: #8447
Co-authored-by: ribaricplusplus <ribaricplusplus@users.noreply.github.com>
2025-08-29 14:35:49 +02:00
Henrik Lissner
64b4e565c3 refactor(tree-sitter): remove redundant grammars
Already registered by csharp and web module packages.

Amend: 5bf132a80f
Amend: c403bb5e2f
2025-08-28 14:32:08 +02:00
Henrik Lissner
3b58741522 refactor(tree-sitter): centralize grammar config & hacks
Easier to track and maintain.
2025-08-27 16:57:28 +02:00
Henrik Lissner
6009c2b838 fix(tree-sitter): backport treesit-{enabled-modes,major-mode-remap-alist}
And ignore `treesit-major-mode-remap-alist`, because they could
interfere with our UX improvements.
2025-08-23 18:43:14 +02:00
Henrik Lissner
2adbdf1360 feat(clojure): add treesit support 2025-06-30 15:16:26 +02:00
Henrik Lissner
7949d1bf27 fix(tree-sitter): void-variable +tree-sitter--major-mode-remaps-alist
This is a temporary solution and will be polished up before the treesit
branch is merged into master.

Ref: #7623
Amend: 617d8411e6
2025-06-30 14:48:54 +02:00
Henrik Lissner
a8ccd2d47a fix(tree-sitter): unable to find local grammars (part 2)
Ref: #7623
Amend: 4df993d683
2025-06-30 14:47:35 +02:00
Henrik Lissner
0d9cf54c84 refactor(tree-sitter): remove redundant dart grammar
Amend: a287a96aca
2025-06-28 21:17:15 +02:00
Henrik Lissner
7c6e1950e8 feat(go): add treesit support 2025-06-28 20:10:08 +02:00
Henrik Lissner
617d8411e6 fix(tree-sitter): ignore major-mode-remap-defaults for ts modes
...registered with `set-tree-sitter!`. Then we don't have to chase after
packages inconsistently modifying `major-mode-remap-defaults`.
2025-06-28 19:32:27 +02:00
Henrik Lissner
4df993d683 fix(tree-sitter): unable to find local grammars
Ref: #7623
2025-06-28 17:37:24 +02:00
Henrik Lissner
5b37bfee23 feat(nix): add treesit support 2025-05-24 17:27:30 +02:00
Henrik Lissner
3b2caa7dcd feat(docker): add treesit support 2025-05-24 17:11:40 +02:00
Henrik Lissner
7af7280f9e feat(json): add treesit support 2025-05-22 19:53:10 +02:00
Henrik Lissner
f5a1af4bf6 feat(kotlin): add treesit support 2025-05-22 19:50:29 +02:00
Henrik Lissner
c5dd2847ff feat(scala): add treesit support 2025-05-22 19:50:29 +02:00
Henrik Lissner
5db361b474 fix(tree-sitter): remove redundant yaml source
Amend: 2556cb58f2
2025-05-22 18:32:04 +02:00
Henrik Lissner
0c311a5172 feat(elixir): add treesit support 2025-05-22 18:32:03 +02:00
Henrik Lissner
a329d63f7d fix(tree-sitter): discard COMMIT recipe argument on <=30.x
Otherwise `treesit--install-language-grammar-1` will throw an arity
error on Emacs <=30.x when installing grammars.

Fix: #8393
2025-05-16 08:49:20 +02:00
Henrik Lissner
b546522257 docs(tree-sitter): revise doctor output 2025-05-15 18:58:29 +02:00
Henrik Lissner
1670ce2767 feat!(cc): add treesit support
BREAKING CHANGE: Besides treesit support, this removes a few
fontification enhancements (in favor of tree-sitter).
2025-05-15 13:01:40 +02:00
Henrik Lissner
46b87362f7 feat(julia): add treesit support 2025-05-15 13:01:40 +02:00
Henrik Lissner
f002424106 feat(lua): add treesit support 2025-05-15 13:01:40 +02:00
Henrik Lissner
445c982838 feat(ruby): add treesit support 2025-05-15 13:01:40 +02:00
Henrik Lissner
a372eba7cd feat(python): add treesit support 2025-05-15 13:01:39 +02:00
Henrik Lissner
1ac1b70d4e refactor!(tree-sitter): replace tree-sitter w/ treesit
BREAKING CHANGE: This rewrites the :tools tree-sitter module to use
treesit instead of tree-sitter.el. Users will need to adapt to treesit
and remove any tree-sitter-specific config in their dotfiles.

Ref: #7623
Ref: #7742
Ref: #8197
2025-05-15 13:01:29 +02:00
Henrik Lissner
50200762cd bump: :tools
doomelpa/code-review@fba8fe3343 -> doomelpa/code-review@303edcfbad
emacs-citar/citar@ce5e9644ed -> emacs-citar/citar@5ef097beba
emacs-lsp/lsp-mode@54251da4ff -> emacs-lsp/lsp-mode@c77ba14106
emacs-straight/dape@588a907c87 -> emacs-straight/dape@8dbe56d7c7
emacs-straight/eglot@6a9e0c76b9 -> emacs-straight/eglot@0b0f894713
emacs-tree-sitter/elisp-tree-sitter@12f92ef399 -> emacs-tree-sitter/elisp-tree-sitter@1c455b0953
emacs-tree-sitter/tree-sitter-langs@4eb4989d1a -> emacs-tree-sitter/tree-sitter-langs@becd29c756
emacsorphanage/quickrun@a5c9a5e8c6 -> emacsorphanage/quickrun@bae8efb8c5
karthink/gptel@1aa5f1c10d -> karthink/gptel@e1050ef6e5
magit/magit@531e7ca619 -> magit/magit@04ee83d93f
2025-05-15 11:39:50 +02:00
Henrik Lissner
6c1965b1ed fix(magit): +magit-auto-revert: handle edge cases
In cases where user have changed `vc-follow-symlinks`,
causing *Messages* spam and unexpected prompting, OR where revert-buffer
hooks and handlers are prematurely triggered for file buffers that
haven't been changed.

Fix: #8392
2025-05-15 11:39:50 +02:00
Henrik Lissner
4b99e6f156 fix(debugger): wrong-number-of-arguments error
dape-breakpoint-save's sole argument is optional. Calls omitting it
would cause our advise to throw an arity error.

Amend: 52dbde017a
2025-05-14 23:43:58 +02:00
Henrik Lissner
e614ffbda8 fix(llm): don't auto-kill gptel popup buffer
Fix: #8387
2025-05-11 20:34:14 -04:00
Henrik Lissner
07ea4b1ee0 nit(terraform): reformat
To match the formatting of other Doom modules.
2025-05-11 04:20:06 -04:00
Debashis Biswas
56fc5410c2 fix(terraform): duplicate localleader keybind 2025-05-11 00:52:54 -04:00
Henrik Lissner
66f1b25dac fix(upload): install ssh-deploy from emacsmirror
cjohansson/emacs-ssh-deploy has inexplicably vanished, causing `doom
sync` to fail when trying to install it, so we switch to a mirror.

Fix: #8383
2025-05-09 21:31:11 -04:00
Henrik Lissner
6898a9c267 module: add :tools llm
Clippy is making a comeback.

Close: #7231
2025-05-06 22:30:49 -04:00
Henrik Lissner
13e92ceb3c revert: eglot
emacs-straight/eglot@928c216af5 -> emacs-straight/eglot@6a9e0c76b9

Fix: #8380
Amend: 7088257f2e
2025-05-06 01:39:10 -04:00
Henrik Lissner
555680036c fix(lookup): dash docset lookup
This adapts to breaking API changes upstream.

Ref: emacsmirror/consult@ada079d593
Fix: #8305
Amend: 7088257f2e
2025-05-06 00:23:14 -04:00
Henrik Lissner
f5b9cce5e0 fix(magit): don't widen repo buffers on auto-revert
Fix: #8378
Amend: 17a870fef8
2025-05-03 16:30:45 -04:00
Henrik Lissner
7088257f2e bump: *
Alexander-Miller/treemacs@96a808f067 -> Alexander-Miller/treemacs@820b09db10
FStarLang/fstar-mode.el@36ffb46259 -> FStarLang/fstar-mode.el@3bbfe93abd
JuliaEditorSupport/julia-emacs@0f4d74f904 -> JuliaEditorSupport/julia-emacs@5c940c4ba3
ProofGeneral/PG@85cde55a86 -> ProofGeneral/PG@af2e7b9a4e
Silex/docker.el@3bea08f1d2 -> Silex/docker.el@464105ed8b
Wilfred/helpful@6a4d5e0760 -> Wilfred/helpful@03756fa6ad
abo-abo/swiper@e33b028ed4 -> abo-abo/swiper@2529a23f9f
agda/agda@49a12eab7f -> agda/agda@900bdaa335
alexluigit/dirvish@ecb7c42e20 -> alexluigit/dirvish@e8ec5765da
ardumont/markdown-toc@d2fb4cbd95 -> ardumont/markdown-toc@1b0c5ae7f3
bastibe/org-journal@cf72173233 -> bastibe/org-journal@e581bf5530
clojure-emacs/cider@fdfa7c2200 -> clojure-emacs/cider@12f10a6f4b
clojure-emacs/clojure-mode@eabe29b076 -> clojure-emacs/clojure-mode@b766094aea
company-mode/company-mode@8d599ebc8a -> company-mode/company-mode@41f07c7d40
creichert/ido-vertical-mode.el@b1659e967d -> creichert/ido-vertical-mode.el@35c521789b
dgutov/diff-hl@7da881a957 -> dgutov/diff-hl@aa667ac58a
dimitri/switch-window@61e425e703 -> dimitri/switch-window@8f771b571a
doomelpa/code-review@eeffdd9e20 -> doomelpa/code-review@fba8fe3343
editorconfig/editorconfig-emacs@1a9942746c -> editorconfig/editorconfig-emacs@d2beb3ec2e
ema2159/centaur-tabs@7704f2017c -> ema2159/centaur-tabs@a790dc8fb6
emacs-circe/circe@d0e531bd2a -> emacs-circe/circe@e5e64d549f
emacs-citar/citar-org-roam@ff38add0aa -> emacs-citar/citar-org-roam@9750cfbbf3
emacs-ess/ESS@56f355acbd -> emacs-ess/ESS@d19efaae12
emacs-helm/helm-org@22d60952f8 -> emacs-helm/helm-org@4744ca7f8b
emacs-helm/helm@f948dc4464 -> emacs-helm/helm@5a222a8a6b
emacs-lsp/dap-mode@56e92dd86b -> emacs-lsp/dap-mode@b977566657
emacs-lsp/emacs-ccls@28c7930c89 -> emacs-lsp/emacs-ccls@5636ee6c50
emacs-lsp/helm-lsp@cf4ea6fb42 -> emacs-lsp/helm-lsp@54926afd10
emacs-lsp/lsp-dart@2170823139 -> emacs-lsp/lsp-dart@34e2a1191f
emacs-lsp/lsp-haskell@cd0f5d251c -> emacs-lsp/lsp-haskell@081d5115ce
emacs-lsp/lsp-ivy@bdc730a209 -> emacs-lsp/lsp-ivy@3ee14a24bb
emacs-lsp/lsp-java@6cfff8761e -> emacs-lsp/lsp-java@21c89243ad
emacs-lsp/lsp-metals@345b4fa80e -> emacs-lsp/lsp-metals@e1d9d04f3b
emacs-lsp/lsp-mode@7c0df125c1 -> emacs-lsp/lsp-mode@54251da4ff
emacs-lsp/lsp-pyright@b4cee81af4 -> emacs-lsp/lsp-pyright@73377169be
emacs-lsp/lsp-sourcekit@3bd9750e7e -> emacs-lsp/lsp-sourcekit@1fb230109e
emacs-lsp/lsp-treemacs@312dee2b3a -> emacs-lsp/lsp-treemacs@3e5550f278
emacs-lsp/lsp-ui@09d4080642 -> emacs-lsp/lsp-ui@a0dde8b52b
emacs-php/composer.el@6c7e19256f -> emacs-php/composer.el@eba6b953a4
emacs-php/php-mode@5b6cc1c068 -> emacs-php/php-mode@462b62248f
emacs-php/psysh.el@ae15a36301 -> emacs-php/psysh.el@223bf55975
emacs-rustic/rustic@22a5ef8bfd -> emacs-rustic/rustic@29f912c750
emacs-straight/auctex@6fb366064c -> emacs-straight/auctex@f58a2b972b
emacs-straight/dape@c7a1f1abdb -> emacs-straight/dape@588a907c87
emacs-straight/eglot@6a9e0c76b9 -> emacs-straight/eglot@928c216af5
emacs-straight/org-mode@74dde3abae -> emacs-straight/org-mode@79781bac69
emacs-straight/project@369ac661c8 -> emacs-straight/project@27c6b04914
emacs-straight/sml-mode@021233f60a -> emacs-straight/sml-mode@c33659fd9b
emacs-straight/use-package@d79bac4574 -> emacs-straight/use-package@bbfe01bdf1
emacs-straight/vundo@c32481ab48 -> emacs-straight/vundo@5a666b34e4
emacs-tree-sitter/elisp-tree-sitter@8516c9977e -> emacs-tree-sitter/elisp-tree-sitter@12f92ef399
emacs-tree-sitter/tree-sitter-langs@2ff446b4b8 -> emacs-tree-sitter/tree-sitter-langs@4eb4989d1a
emacsmirror/org-contrib@8d14a600a2 -> emacsmirror/org-contrib@f1f6b6ec81
emacsorphanage/dart-mode@6229941ec5 -> emacsorphanage/dart-mode@f82ff05230
emacsorphanage/ox-pandoc@34e6ea97b5 -> emacsorphanage/ox-pandoc@5766c70b6d
emacsorphanage/quickrun@4b6df453f8 -> emacsorphanage/quickrun@a5c9a5e8c6
ericdallo/hover.el@4ca0638a14 -> ericdallo/hover.el@1b380fa395
erlang/otp@740af6bae5 -> erlang/otp@b9d3ec017d
flycheck/flycheck@b9db1379dc -> flycheck/flycheck@16b536b031
fsharp/emacs-fsharp-mode@bf7a11e1ba -> fsharp/emacs-fsharp-mode@8d08f05788
godotengine/emacs-gdscript-mode@3f3739dd88 -> godotengine/emacs-gdscript-mode@5136be407a
greghendershott/racket-mode@88d82e249e -> greghendershott/racket-mode@c4cc7c160b
hakimel/reveal.js@dfc5690c6d -> hakimel/reveal.js@eb95b14531
haskell/haskell-mode@be2639592f -> haskell/haskell-mode@e9c3567393
https://git.notmuchmail.org/git/notmuch@dfc800c26e7b -> https://git.notmuchmail.org/git/notmuch@d8ebc9cf80b6
https://git.savannah.gnu.org/git/emms.git@8713a0ee985c -> https://git.savannah.gnu.org/git/emms.git@abb4f614dae6
idris-hackers/idris-mode@09de86a8f0 -> idris-hackers/idris-mode@ccf32ed0b5
jcollard/elm-mode@699841865e -> jcollard/elm-mode@90b72cd2c9
jdtsmith/indent-bars@fa293f98ab -> jdtsmith/indent-bars@ea74161b46
jdtsmith/ultra-scroll@b72c507f67 -> jdtsmith/ultra-scroll@f2e4fba601
jimhourihan/glsl-mode@c5f2c2e7ed -> jimhourihan/glsl-mode@86e6bb6cf2
joaotavora/sly@c48defcf58 -> joaotavora/sly@ce17a568ef
jrblevin/markdown-mode@d2d960bec1 -> jrblevin/markdown-mode@90ad4af79a
jschaf/powershell.el@38727f1cda -> jschaf/powershell.el@9efa1b4d0a
magit/magit@bf58615a03 -> magit/magit@531e7ca619
minad/cape@f72ebcaeff -> minad/cape@5546a2db8e
minad/consult-flycheck@3bc2141daf -> minad/consult-flycheck@77d3e790a3
minad/consult@f94d557807 -> minad/consult@ee64a2a299
minad/corfu@061d926d0f -> minad/corfu@2e05fe8244
minad/goggles@d71e85ff8d -> minad/goggles@6141d31c51
minad/marginalia@c51fd9e4d4 -> minad/marginalia@2ff4d690f7
minad/org-modern@3cc432dc99 -> minad/org-modern@6158d3d007
minad/vertico@e0bb699ebf -> minad/vertico@304be874be
mohkale/consult-yasnippet@834d39acfe -> mohkale/consult-yasnippet@a3482dfbdc
msnoigrs/ox-rst@b4ba5c7e95 -> msnoigrs/ox-rst@b73eff187e
oantolin/embark@d5df0eff18 -> oantolin/embark@923d0ec52e
ocaml/dune@a46193e167 -> ocaml/dune@422986440e
ocaml/merlin@2eeb63d002 -> ocaml/merlin@e4c66857ad
oer/org-re-reveal@53e9be7d89 -> oer/org-re-reveal@89ed240450
polymode/poly-R@8024e852cf -> polymode/poly-R@fee0b6e999
purcell/package-lint@43012b41ac -> purcell/package-lint@2dc48e5fb9
purescript-emacs/purescript-mode@a3d6ca4ba5 -> purescript-emacs/purescript-mode@8c4736759a
pythonic-emacs/pyenv-mode@7faed57eb7 -> pythonic-emacs/pyenv-mode@ba1a8c7bd7
rust-lang/rust-mode@efd830806c -> rust-lang/rust-mode@25d91cff28
seagle0128/doom-modeline@1708db2d35 -> seagle0128/doom-modeline@a85cb28da8
seagle0128/grip-mode@e90e3b47d8 -> seagle0128/grip-mode@96a927dce6
seagle0128/nerd-icons-ivy-rich@5006f91b49 -> seagle0128/nerd-icons-ivy-rich@83c7b60595
sebasmonia/sharper@496e90e337 -> sebasmonia/sharper@5049795848
swift-emacs/swift-mode@2c0b2b72dc -> swift-emacs/swift-mode@e30b9d46e0
szermatt/emacs-bash-completion@a4c8fbc902 -> szermatt/emacs-bash-completion@d0637428fd
technomancy/fennel-mode@811f39de12 -> technomancy/fennel-mode@df8e83d6e2
wanderlust/wanderlust@6a0605415d -> wanderlust/wanderlust@d6dcbad228
weijiangan/flycheck-golangci-lint@424ba1b3a1 -> weijiangan/flycheck-golangci-lint@14bf143ea7
ziglang/zig-mode@4ad4edf759 -> ziglang/zig-mode@c46d024733
2025-05-02 14:58:40 -04:00
Henrik Lissner
52dbde017a fix(debugger): error if breakpoints dir is missing 2025-05-02 14:56:11 -04:00
Henrik Lissner
da32e8e6f2 fix(lsp): gate gcmh API call behind gcmh-mode check
In case the mode is activated before gcmh is loaded (as is the case with
session persistance libraries like desktop.el or
persp{ective,-mode}.el).

Close: #8372
2025-04-23 05:39:13 -04:00
Henrik Lissner
9cbb8656cb feat(lookup): +lookup-provider-url-alist: add StackExchange 2025-04-23 04:02:51 -04:00
Henrik Lissner
b4bd368485 refactor!(debugger): replace realgud with dape
BREAKING CHANGE: Anyone used to realgud will find it missing as of this
commit. It's been replaced with Dape (see
https://github.com/svaante/dape).

This change was made because realgud's implementation was archaic and
over-complicated, dap-mode requires lsp-mode (and has a lot of moving
parts and points of failure), and dape is straight-forward by
comparison; to set up and use. Note that dap-mode and dap-ui is now
deprecated and will be removed in the future, but still remains behind
the +lsp flag for backwards compatibility, at least until v3.

This also adds a '<leader> d' prefix for debugger commands (except for
vanilla users, who already have dape's prefix on 'C-x C-a')
2025-04-23 04:02:06 -04:00
Henrik Lissner
a45ce1e14d fix(magit): do less on magit-refresh-buffer
Inhibit recentf-cleanup and projectile caching, and silence it's logging
on refresh-buffer. The former can potentially be slow and isn't
necessary on top of invalidating the cache, and the latter is noise.
2025-04-13 06:52:24 -04:00
Henrik Lissner
6e92ca594f perf(magit): noop +magit-mark-stale-buffers-h if disabled
A little less work to do.
2025-04-13 02:50:09 -04:00