aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/rust
diff options
context:
space:
mode:
authorAnton Romanov2022-06-14 17:35:36 +0000
committerGitHub2022-06-14 17:35:36 +0000
commit7983c71752e2443266ecc65581f3a980696cc294 (patch)
tree04f145b2f0c2e2ccb0d5213f169110e2937c075b /runtime/queries/rust
parentcdeab337cdba5265dcc72070f2b2e4fd11724670 (diff)
Introduce storage_class highlight scope (#2731)
Diffstat (limited to 'runtime/queries/rust')
-rw-r--r--runtime/queries/rust/highlights.scm18
1 files changed, 12 insertions, 6 deletions
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