diff options
author | Michael Davis | 2022-06-29 01:10:19 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-07-01 09:04:23 +0000 |
commit | 78c944ebc3c62c673f203785cdb39498e52115b7 (patch) | |
tree | b136bdddf8f27a75bab5ba23d3219432c21eb5e6 /runtime | |
parent | beb19fe1bd52abd32b56f51d47bf54f744a0d19f (diff) |
rust: fix highlight corner-cases
* add punctuation highlights for commas as in function parameters
* remove stray `variable.parameter` highlight
* I couldn't find any regressions from this and it fixes an
edge case I ran into (but sadly did not record 😓)
* highlight `fn` as `keyword.function`
* the theme docs have `fn` as an example so it seems fitting
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/queries/rust/highlights.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index 4b0c018e..5897991e 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -57,6 +57,7 @@ "::" "." ";" + "," ] @punctuation.delimiter [ @@ -95,8 +96,6 @@ value: (identifier)? @variable field: (field_identifier) @variable.other.member)) -(arguments - (identifier) @variable.parameter) (parameter pattern: (identifier) @variable.parameter) (closure_parameters @@ -141,7 +140,6 @@ "mod" "extern" - "fn" "struct" "enum" "impl" @@ -160,6 +158,8 @@ "async" ] @keyword +"fn" @keyword.function + (mutable_specifier) @keyword.storage.modifier.mut (reference_type "&" @keyword.storage.modifier.ref) |