mirror of https://github.com/helix-editor/helix
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
pull/2938/head
parent
beb19fe1bd
commit
78c944ebc3
|
@ -57,6 +57,7 @@
|
||||||
"::"
|
"::"
|
||||||
"."
|
"."
|
||||||
";"
|
";"
|
||||||
|
","
|
||||||
] @punctuation.delimiter
|
] @punctuation.delimiter
|
||||||
|
|
||||||
[
|
[
|
||||||
|
@ -95,8 +96,6 @@
|
||||||
value: (identifier)? @variable
|
value: (identifier)? @variable
|
||||||
field: (field_identifier) @variable.other.member))
|
field: (field_identifier) @variable.other.member))
|
||||||
|
|
||||||
(arguments
|
|
||||||
(identifier) @variable.parameter)
|
|
||||||
(parameter
|
(parameter
|
||||||
pattern: (identifier) @variable.parameter)
|
pattern: (identifier) @variable.parameter)
|
||||||
(closure_parameters
|
(closure_parameters
|
||||||
|
@ -141,7 +140,6 @@
|
||||||
"mod"
|
"mod"
|
||||||
"extern"
|
"extern"
|
||||||
|
|
||||||
"fn"
|
|
||||||
"struct"
|
"struct"
|
||||||
"enum"
|
"enum"
|
||||||
"impl"
|
"impl"
|
||||||
|
@ -160,6 +158,8 @@
|
||||||
"async"
|
"async"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
"fn" @keyword.function
|
||||||
|
|
||||||
(mutable_specifier) @keyword.storage.modifier.mut
|
(mutable_specifier) @keyword.storage.modifier.mut
|
||||||
|
|
||||||
(reference_type "&" @keyword.storage.modifier.ref)
|
(reference_type "&" @keyword.storage.modifier.ref)
|
||||||
|
|
Loading…
Reference in New Issue