on master help sign in
replace kdl tree-sitter to fix highlighting (#8652)
5c325fecgahr
book/src/generated/lang-support.md+1−1
@@ -81,7 +81,7 @@
81| jsx | ✓ | ✓ | ✓ | `typescript-language-server` |
81| jsx | ✓ | ✓ | ✓ | `typescript-language-server` |
82| julia | ✓ | ✓ | ✓ | `julia` |
82| julia | ✓ | ✓ | ✓ | `julia` |
83| just | ✓ | ✓ | ✓ | |
83| just | ✓ | ✓ | ✓ | |
84−| kdl | ✓ | | | |
84+| kdl | ✓ | ✓ | ✓ | |
85| kotlin | ✓ | | | `kotlin-language-server` |
85| kotlin | ✓ | | | `kotlin-language-server` |
86| latex | ✓ | ✓ | | `texlab` |
86| latex | ✓ | ✓ | | `texlab` |
87| lean | ✓ | | | `lean` |
87| lean | ✓ | | | `lean` |
languages.toml+1−1
@@ -2340,7 +2340,7 @@ injection-regex = "kdl"
2340
2340
2341[[grammar]]
2341[[grammar]]
2342name = "kdl"
2342name = "kdl"
2343−source = { git = "https://github.com/Unoqwy/tree-sitter-kdl", rev = "e1cd292c6d15df6610484e1d4b5c987ecad52373" }
2343+source = { git = "https://github.com/amaanq/tree-sitter-kdl", rev = "3ca569b9f9af43593c24f9e7a21f02f43a13bb88" }
2344
2344
2345[[language]]
2345[[language]]
2346name = "xml"
2346name = "xml"
runtime/queries/kdl/highlights.scm+4−4
@@ -1,12 +1,12 @@
1−(comment) @comment
2(single_line_comment) @comment
1(single_line_comment) @comment
2+(multi_line_comment) @comment
3
3
4(node
4(node
5− name: (identifier) @function)
5+ (identifier) @variable)
6+
6(prop (identifier) @attribute)
7(prop (identifier) @attribute)
7−(type) @type
8
8
9−(bare_identifier) @variable.other.member
9+(type (_) @type) @punctuation.bracket
10
10
11(keyword) @keyword
11(keyword) @keyword
12
12
runtime/queries/kdl/indents.scmnew file+3
@@ -0,0 +1,3 @@
1+(node_children) @indent
2+
3+ "}" @outdent
runtime/queries/kdl/textobjects.scmnew file+27
@@ -0,0 +1,27 @@
1+(type (_) @test.inside) @test.around
2+
3+(node
4+ children: (node_children)? @class.inside) @class.around
5+
6+(node
7+ children: (node_children)? @function.inside) @function.around
8+
9+(node (identifier) @function.movement)
10+
11+[
12+ (single_line_comment)
13+ (multi_line_comment)
14+] @comment.inside
15+
16+[
17+ (single_line_comment)+
18+ (multi_line_comment)+
19+] @comment.around
20+
21+[
22+ (prop)
23+ (value)
24+] @parameter.inside
25+
26+(value (type) ? (_) @parameter.inside @parameter.movement . ) @parameter.around
27+