Commit Graph

4572 Commits

Author SHA1 Message Date
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
d77d39ab46 refactor(scala): remove redundant config
Amend: c5dd2847ff
2025-08-30 10:30:26 +02:00
Henrik Lissner
bcb2c56dd9 fix(haskell): haskell-ts-mode: repl & eglot integration
Amend: 47fe11cd76
2025-08-30 10:30:26 +02:00
Henrik Lissner
0ba85c8f77 refactor(lua): DRY tree-sitter config 2025-08-30 10:30:26 +02:00
Henrik Lissner
ab4dace692 refactor(:lang): remove redudant mode-alist lines
Amend: 3b58741522
2025-08-30 10:30:26 +02:00
Henrik Lissner
2870697e1a fix(go,nix,zig): dynamic keymap interpolation errors
Amend: 7c6e1950e8
Amend: 5b37bfee23
Amend: 9acc5f48b6
2025-08-30 10:30:21 +02:00
Henrik Lissner
3044812ac1 fix(clojure): remove vestiges of tree-sitter
Amend: 2adbdf1360
2025-08-29 18:23:18 +02:00
Henrik Lissner
31f5b60f5e fix(php): dynamic mode map interpolation error
Amend: 9073b24878
Close: #8448
Co-authored-by: ribaricplusplus <ribaricplusplus@users.noreply.github.com>
2025-08-29 17:56:55 +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
d20c5f1273 docs(haskell): mention haskell-ts-mode package
Amend: 47fe11cd76
2025-08-28 14:32:08 +02:00
Henrik Lissner
f782b79797 feat(graphql): add treesit support 2025-08-28 14:32:08 +02:00
Henrik Lissner
93c085fa13 feat(qt): add treesit (and lsp) support 2025-08-28 14:32:08 +02:00
Henrik Lissner
cfadd8f6a4 feat(sml): add treesit (and lsp) support 2025-08-28 14:00:59 +02:00
Henrik Lissner
5bf132a80f feat(web): add treesit support (for html/css) 2025-08-27 17:38:40 +02:00
Henrik Lissner
6b203d74c9 refactor(sh): remove tree-sitter support
bash-ts-mode is inferior to shell-script-mode's syntax highlighting and
no other *-ts-mode modes are available for other shells (though,
there *are* powershell and nushell ts-modes; I'll investigate those
later).
2025-08-27 17:32:56 +02:00
Henrik Lissner
07e7c699cf feat(java): add treesit support 2025-08-27 17:29:58 +02:00
Henrik Lissner
6ca155ea11 refactor(ess): remove tree-sitter support
No *-ts-mode exists for ess-r-mode (or any other ess mode, afaik). The
ess module will fall back to font-lock rules so this is not a breaking
changing.
2025-08-27 17:29:58 +02:00
Henrik Lissner
bf85767975 refactor(graphviz): remove tree-sitter support
No *-ts-mode exists for graphviz-dot-mode. The graphviz module will fall
back to font-lock rules so this is not a breaking changing.
2025-08-27 17:29:58 +02:00
Henrik Lissner
3d2abf8b05 feat(erlang): add treesit support 2025-08-27 17:29:58 +02:00
Henrik Lissner
bee45157c6 refactor(elm): remove tree-sitter support
No *-ts-mode exists for elm-mode. The elm module will fall back to
font-lock rules so this is not a breaking changing.
2025-08-27 17:29:58 +02:00
Henrik Lissner
c1ac8bc37a refactor(ocaml): remove tree-sitter support
No *-ts-mode exists for tuareg-mode. There *is* a ocaml-ts-mode, but
it's too rudimentary. The ocaml module will fall back to font-lock rules
so this is not a breaking changing.
2025-08-27 17:29:28 +02:00
Henrik Lissner
47fe11cd76 feat(haskell): add treesit support 2025-08-27 17:29:14 +02:00
Henrik Lissner
086a0d30d0 feat(rust): add treesit support 2025-08-27 16:57:39 +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
2adbdf1360 feat(clojure): add treesit support 2025-06-30 15:16:26 +02:00
Henrik Lissner
a287a96aca feat(dart): add treesit support
This does not port over the keybinds to dart-ts-mode. Those will be done
separately.
2025-06-28 21:13:57 +02:00
Henrik Lissner
7c6e1950e8 feat(go): add treesit support 2025-06-28 20:10:08 +02:00
Henrik Lissner
3155fefd47 feat(swift): add treesit support 2025-06-28 19:42:15 +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
22e03d7e90 fix(elixir): duplicate auto-mode-alist entries
Due to copypasta typo.

Amend: 0c311a5172
2025-06-28 17:40:18 +02:00
Henrik Lissner
5b37bfee23 feat(nix): add treesit support 2025-05-24 17:27:30 +02:00
Henrik Lissner
9acc5f48b6 feat(zig): add treesit support 2025-05-24 17:27:11 +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
0c311a5172 feat(elixir): add treesit support 2025-05-22 18:32:03 +02:00
Henrik Lissner
776da0dcf1 fix(csharp): csharp-ts-mode: side-effects on auto-mode-alist
Would otherwise be imposed every time the mode is activated.
2025-05-16 08:46:21 +02:00
Henrik Lissner
2556cb58f2 feat(yaml): add treesit support 2025-05-15 18:55:42 +02:00
Henrik Lissner
8931c48913 fix(cc): treesit modes not remapped to
c-ts-mode and c++-ts-mode weren't being remapped to from c-mode/c++-mode
because of extra noise in `major-mode-remap-defaults`. I wish these
packages would leave these variables alone and leave it to the user to
configure; they're often inconsistent and overbearing.
2025-05-15 18:31:55 +02:00
Henrik Lissner
5be0df24d3 docs(csharp,julia,lua,markdown): mention +tree-sitter requirements 2025-05-15 18:19:32 +02:00
Henrik Lissner
9073b24878 feat(php): add treesit support 2025-05-15 18:19:32 +02:00
Henrik Lissner
e0e2c3aa61 feat(janet): add treesit support 2025-05-15 18:19:24 +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
c403bb5e2f feat(csharp): add treesit support 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
e6caaef9e6 fix(agda): remove defunct tree-sitter.el 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
7cb23f3359 feat(markdown): 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