on master help sign in
switch to tree-sitter-ron (#8624)
4f1d414Gabriel Dinner-David
languages.toml+4−1
@@ -1689,7 +1689,10 @@ file-types = ["ron"]
1689roots = []
1689roots = []
1690comment-token = "//"
1690comment-token = "//"
1691indent = { tab-width = 4, unit = " " }
1691indent = { tab-width = 4, unit = " " }
1692+
1692−grammar = "rust"
1693+[[grammar]]
1694+name = "ron"
1695+source = { git = "https://github.com/zee-editor/tree-sitter-ron", rev = "7762d709a0f7c1f9e269d0125a2e8a7a69006146" }
1693
1696
1694[[language]]
1697[[language]]
1695name = "robot"
1698name = "robot"
runtime/queries/ron/highlights.scm+43−1
@@ -1 +1,43 @@
1−; inherits: rust
1+; Literals
2+;------------
3+
4+(string) @string
5+(boolean) @constant.builtin.boolean
6+(integer) @constant.numeric.integer
7+(float) @constant.numeric.float
8+(char) @constant.character
9+
10+; Structs
11+;------------
12+
13+(enum_variant) @type.enum.variant
14+(struct_entry (_) @variable.other.member ":")
15+(struct_name (identifier)) @type
16+
17+
18+
19+
20+; Comments
21+;------------
22+
23+(line_comment) @comment.line
24+(block_comment) @comment.block
25+
26+
27+; Punctuation
28+;------------
29+
30+"," @punctuation.delimiter
31+":" @punctuation.delimiter
32+
33+"(" @punctuation.bracket
34+")" @punctuation.bracket
35+"[" @punctuation.bracket
36+"]" @punctuation.bracket
37+"{" @punctuation.bracket
38+"}" @punctuation.bracket
39+
40+
41+; Special
42+;------------
43+(escape_sequence) @constant.character.escape
runtime/queries/ron/indents.scm+12−1
@@ -1 +1,12 @@
1−; inherits: rust
1+[
2+ (array)
3+ (map)
4+ (tuple)
5+ (struct)
6+] @indent
7+
8+[
9+ "}"
10+ "]"
11+ ")"
12+] @outdent
runtime/queries/ron/injections.scm+2−1
@@ -1 +1,2 @@
1−; inherits: rust
1+([(line_comment) (block_comment)] @injection.content
2+ (#set! injection.language "comment"))