fix(csharp): treesit: use v0.20.0 on Emacs <=29

v0.20+ doesn't work on Emacs 29, spewing node query errors, so we use
v0.20 there instead (and the latest stable on 30, and cutting edge on
31+ where :commit is recognized and has precedence over :rev).
This commit is contained in:
Henrik Lissner
2025-09-01 21:43:18 +02:00
parent a91f93a33a
commit 076c03bf2e

View File

@@ -5,9 +5,9 @@
:init
(when (modulep! +tree-sitter)
(set-tree-sitter! 'csharp-mode 'csharp-ts-mode
'((c-sharp :url "https://github.com/tree-sitter/tree-sitter-c-sharp"
:rev "v0.23.1"
:commit "362a8a41b265056592a0c3771664a21d23a71392"))))
`((c-sharp :url "https://github.com/tree-sitter/tree-sitter-c-sharp"
:rev ,(if (< emacs-major-version 30) "v0.20.0" "v0.23.1")
:commit "3431444351c871dffb32654f1299a00019280f2f"))))
:config
(set-formatter! 'csharpier '("csharpier" "format" "--write-stdout")
:modes '(csharp-mode csharp-ts-mode))