summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorGabriel Dinner-David2023-10-26 23:40:16 +0000
committerGitHub2023-10-26 23:40:16 +0000
commit4f1d414d9c04e611e60f1af5e69f2347a17bc6ce (patch)
tree46f375ccba61a3a924b778f8d4b8dd9fac9ae1e1 /runtime
parent553ffbcaa09847ec606539bddab8af1456450d73 (diff)
switch to tree-sitter-ron (#8624)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/queries/ron/highlights.scm44
-rw-r--r--runtime/queries/ron/indents.scm13
-rw-r--r--runtime/queries/ron/injections.scm3
3 files changed, 57 insertions, 3 deletions
diff --git a/runtime/queries/ron/highlights.scm b/runtime/queries/ron/highlights.scm
index 43766a4f..1061d559 100644
--- a/runtime/queries/ron/highlights.scm
+++ b/runtime/queries/ron/highlights.scm
@@ -1 +1,43 @@
-; inherits: rust \ No newline at end of file
+; Literals
+;------------
+
+(string) @string
+(boolean) @constant.builtin.boolean
+(integer) @constant.numeric.integer
+(float) @constant.numeric.float
+(char) @constant.character
+
+; Structs
+;------------
+
+(enum_variant) @type.enum.variant
+(struct_entry (_) @variable.other.member ":")
+(struct_name (identifier)) @type
+
+
+
+
+; Comments
+;------------
+
+(line_comment) @comment.line
+(block_comment) @comment.block
+
+
+; Punctuation
+;------------
+
+"," @punctuation.delimiter
+":" @punctuation.delimiter
+
+"(" @punctuation.bracket
+")" @punctuation.bracket
+"[" @punctuation.bracket
+"]" @punctuation.bracket
+"{" @punctuation.bracket
+"}" @punctuation.bracket
+
+
+; Special
+;------------
+(escape_sequence) @constant.character.escape
diff --git a/runtime/queries/ron/indents.scm b/runtime/queries/ron/indents.scm
index 43766a4f..e73bf922 100644
--- a/runtime/queries/ron/indents.scm
+++ b/runtime/queries/ron/indents.scm
@@ -1 +1,12 @@
-; inherits: rust \ No newline at end of file
+[
+ (array)
+ (map)
+ (tuple)
+ (struct)
+] @indent
+
+[
+ "}"
+ "]"
+ ")"
+] @outdent
diff --git a/runtime/queries/ron/injections.scm b/runtime/queries/ron/injections.scm
index 43766a4f..e4509a5f 100644
--- a/runtime/queries/ron/injections.scm
+++ b/runtime/queries/ron/injections.scm
@@ -1 +1,2 @@
-; inherits: rust \ No newline at end of file
+([(line_comment) (block_comment)] @injection.content
+ (#set! injection.language "comment"))