Add @operator, @lifetime and @punctuation.delimiters captures for Rust (#10885)

Adds additional captures for theming rust code.

I'm uncertain about whether `#` belongs in the `@operator` capture, but
I didn't see a more appropriate capture name in my brief hunt in other
files. It is the prefix of an `attribute_item`.. suggestions welcome.

Release Notes:

- Added `@operator`, `@lifetime` and `@punctuation.delimiter` captures
to Rust highlights file.
This commit is contained in:
James Thurley 2024-04-25 19:20:20 +01:00 committed by GitHub
parent 544bd490ac
commit d3f6ca7a1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,6 +64,16 @@
"<" @punctuation.bracket
">" @punctuation.bracket)
[
";"
","
"::"
] @punctuation.delimiter
[
"#"
] @punctuation.special
[
"as"
"async"
@ -122,3 +132,50 @@
(line_comment)
(block_comment)
] @comment
[
"!"
"!="
"%"
"%="
"&"
"&="
"&&"
"*"
"*="
"*"
"+"
"+="
","
"-"
"-="
"->"
"."
".."
"..="
"..."
"/"
"/="
":"
";"
"<<"
"<<="
"<"
"<="
"="
"=="
"=>"
">"
">="
">>"
">>="
"@"
"^"
"^="
"|"
"|="
"||"
"?"
] @operator
(lifetime) @lifetime