aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--queries/rust/highlights.scm22
1 files changed, 10 insertions, 12 deletions
diff --git a/queries/rust/highlights.scm b/queries/rust/highlights.scm
index 6c4491a02..5eb6d97b8 100644
--- a/queries/rust/highlights.scm
+++ b/queries/rust/highlights.scm
@@ -185,12 +185,9 @@
[
"default"
- "dyn"
"enum"
- "extern"
"impl"
"let"
- "match"
"move"
"pub"
"struct"
@@ -207,18 +204,21 @@
] @keyword.coroutine
[
- "ref"
+ "ref"
(mutable_specifier)
] @type.qualifier
[
- "const"
- "static"
+ "const"
+ "static"
+ "dyn"
+ "extern"
] @storageclass
(lifetime ["'" (identifier)] @storageclass.lifetime)
"fn" @keyword.function
+
[
"return"
"yield"
@@ -233,8 +233,9 @@
(visibility_modifier [(crate) (super) (self)] @namespace)
[
- "else"
"if"
+ "else"
+ "match"
] @conditional
[
@@ -246,8 +247,7 @@
] @repeat
"for" @keyword
-(for_expression
- "for" @repeat)
+(for_expression "for" @repeat)
;;; Operators & Punctuation
@@ -265,7 +265,6 @@
"+="
"-"
"-="
- "->"
".."
"..="
"/"
@@ -276,7 +275,6 @@
"<="
"="
"=="
- "=>"
">"
">="
">>"
@@ -297,7 +295,7 @@
(bracketed_type ["<" ">"] @punctuation.bracket)
(for_lifetimes ["<" ">"] @punctuation.bracket)
-["," "." ":" "::" ";"] @punctuation.delimiter
+["," "." ":" "::" ";" "->" "=>"] @punctuation.delimiter
(attribute_item "#" @punctuation.special)
(inner_attribute_item ["!" "#"] @punctuation.special)