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
commit78c944ebc3c62c673f203785cdb39498e52115b7
authorMichael Davis <mcarsondavis@gmail.com>
dateTue 28 Jun 2022, 20:10 (4 years ago)
parentbeb19fe
runtime/queries/rust/highlights.scm+3โ3
@@ -57,6 +57,7 @@
5757 "::"
5858 "."
5959 ";"
60+ ","
6061] @punctuation.delimiter
6162
6263[
@@ -95,8 +96,6 @@
9596 value: (identifier)? @variable
9697 field: (field_identifier) @variable.other.member))
9798
98โ(arguments
99โ (identifier) @variable.parameter)
10099(parameter
101100 pattern: (identifier) @variable.parameter)
102101(closure_parameters
@@ -141,7 +140,6 @@
141140 "mod"
142141 "extern"
143142
144โ "fn"
145143 "struct"
146144 "enum"
147145 "impl"
@@ -160,6 +158,8 @@
160158 "async"
161159] @keyword
162160
161+"fn" @keyword.function
162+
163163(mutable_specifier) @keyword.storage.modifier.mut
164164
165165(reference_type "&" @keyword.storage.modifier.ref)