refactor(tree-sitter): centralize grammar config & hacks

Easier to track and maintain.
This commit is contained in:
Henrik Lissner
2025-08-27 00:35:39 +02:00
parent 6009c2b838
commit 3b58741522
18 changed files with 85 additions and 142 deletions

View File

@@ -25,9 +25,7 @@
:when (fboundp 'json-ts-mode) ; 29.1+ only
:defer t
:init
(set-tree-sitter! 'json-mode 'json-ts-mode
'((json :url "https://github.com/tree-sitter/tree-sitter-json"
:rev "v0.24.8")))
(set-tree-sitter! 'json-mode 'json-ts-mode 'json)
:config
;; HACK: Rely on `major-mode-remap-defaults'.
(cl-callf2 assq-delete-all 'json-ts-mode auto-mode-alist)