summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/queries/c/highlights.scm4
-rw-r--r--runtime/queries/rust/highlights.scm18
2 files changed, 14 insertions, 8 deletions
diff --git a/runtime/queries/c/highlights.scm b/runtime/queries/c/highlights.scm
index 918f3f66..1263cff6 100644
--- a/runtime/queries/c/highlights.scm
+++ b/runtime/queries/c/highlights.scm
@@ -1,8 +1,9 @@
+(storage_class_specifier) @keyword.storage
+
"goto" @keyword
"register" @keyword
"break" @keyword
"case" @keyword
-"const" @keyword
"continue" @keyword
"default" @keyword
"do" @keyword
@@ -14,7 +15,6 @@
"inline" @keyword
"return" @keyword
"sizeof" @keyword
-"static" @keyword
"struct" @keyword
"switch" @keyword
"typedef" @keyword
diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm
index 26496c66..99cb8381 100644
--- a/runtime/queries/rust/highlights.scm
+++ b/runtime/queries/rust/highlights.scm
@@ -156,16 +156,22 @@
"macro_rules!"
"let"
- "ref"
- "move"
- "dyn"
- "static"
- "const"
"async"
] @keyword
-(mutable_specifier) @keyword.mut
+(mutable_specifier) @keyword.storage.modifier.mut
+
+(reference_type "&" @keyword.storage.modifier.ref)
+(self_parameter "&" @keyword.storage.modifier.ref)
+
+[
+ "static"
+ "const"
+ "ref"
+ "move"
+ "dyn"
+] @keyword.storage.modifier
; TODO: variable.mut to highlight mutable identifiers via locals.scm