replace kdl tree-sitter to fix highlighting (#8652)

* replace kdl tree-sitter

* kdl: adopt highlights for new tree-sitter

* kdl: add indent queries

* kdl: add textobjects

* kdl: improve syntax highlighting

* kdl: update lang-support

* kdl: make indents more concise

---------

Co-authored-by: Constantin Gahr <constantin.gahr@ipp.mpg.de>
pull/8712/head
cgahr 8 months ago committed by GitHub
parent 70bbbd7d19
commit 5c325fe342
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -81,7 +81,7 @@
| jsx | ✓ | ✓ | ✓ | `typescript-language-server` |
| julia | ✓ | ✓ | ✓ | `julia` |
| just | ✓ | ✓ | ✓ | |
| kdl | ✓ | | | |
| kdl | ✓ | | | |
| kotlin | ✓ | | | `kotlin-language-server` |
| latex | ✓ | ✓ | | `texlab` |
| lean | ✓ | | | `lean` |

@ -2340,7 +2340,7 @@ injection-regex = "kdl"
[[grammar]]
name = "kdl"
source = { git = "https://github.com/Unoqwy/tree-sitter-kdl", rev = "e1cd292c6d15df6610484e1d4b5c987ecad52373" }
source = { git = "https://github.com/amaanq/tree-sitter-kdl", rev = "3ca569b9f9af43593c24f9e7a21f02f43a13bb88" }
[[language]]
name = "xml"

@ -1,12 +1,12 @@
(comment) @comment
(single_line_comment) @comment
(multi_line_comment) @comment
(node
name: (identifier) @function)
(identifier) @variable)
(prop (identifier) @attribute)
(type) @type
(bare_identifier) @variable.other.member
(type (_) @type) @punctuation.bracket
(keyword) @keyword

@ -0,0 +1,3 @@
(node_children) @indent
"}" @outdent

@ -0,0 +1,27 @@
(type (_) @test.inside) @test.around
(node
children: (node_children)? @class.inside) @class.around
(node
children: (node_children)? @function.inside) @function.around
(node (identifier) @function.movement)
[
(single_line_comment)
(multi_line_comment)
] @comment.inside
[
(single_line_comment)+
(multi_line_comment)+
] @comment.around
[
(prop)
(value)
] @parameter.inside
(value (type) ? (_) @parameter.inside @parameter.movement . ) @parameter.around
Loading…
Cancel
Save