mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 17:30:08 -04:00
feat(rust): move some keywords & operators to where they belong
This commit is contained in:
parent
cdc45ac6ba
commit
831f37635d
1 changed files with 10 additions and 12 deletions
|
|
@ -185,12 +185,9 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
"default"
|
"default"
|
||||||
"dyn"
|
|
||||||
"enum"
|
"enum"
|
||||||
"extern"
|
|
||||||
"impl"
|
"impl"
|
||||||
"let"
|
"let"
|
||||||
"match"
|
|
||||||
"move"
|
"move"
|
||||||
"pub"
|
"pub"
|
||||||
"struct"
|
"struct"
|
||||||
|
|
@ -207,18 +204,21 @@
|
||||||
] @keyword.coroutine
|
] @keyword.coroutine
|
||||||
|
|
||||||
[
|
[
|
||||||
"ref"
|
"ref"
|
||||||
(mutable_specifier)
|
(mutable_specifier)
|
||||||
] @type.qualifier
|
] @type.qualifier
|
||||||
|
|
||||||
[
|
[
|
||||||
"const"
|
"const"
|
||||||
"static"
|
"static"
|
||||||
|
"dyn"
|
||||||
|
"extern"
|
||||||
] @storageclass
|
] @storageclass
|
||||||
|
|
||||||
(lifetime ["'" (identifier)] @storageclass.lifetime)
|
(lifetime ["'" (identifier)] @storageclass.lifetime)
|
||||||
|
|
||||||
"fn" @keyword.function
|
"fn" @keyword.function
|
||||||
|
|
||||||
[
|
[
|
||||||
"return"
|
"return"
|
||||||
"yield"
|
"yield"
|
||||||
|
|
@ -233,8 +233,9 @@
|
||||||
(visibility_modifier [(crate) (super) (self)] @namespace)
|
(visibility_modifier [(crate) (super) (self)] @namespace)
|
||||||
|
|
||||||
[
|
[
|
||||||
"else"
|
|
||||||
"if"
|
"if"
|
||||||
|
"else"
|
||||||
|
"match"
|
||||||
] @conditional
|
] @conditional
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
@ -246,8 +247,7 @@
|
||||||
] @repeat
|
] @repeat
|
||||||
|
|
||||||
"for" @keyword
|
"for" @keyword
|
||||||
(for_expression
|
(for_expression "for" @repeat)
|
||||||
"for" @repeat)
|
|
||||||
|
|
||||||
;;; Operators & Punctuation
|
;;; Operators & Punctuation
|
||||||
|
|
||||||
|
|
@ -265,7 +265,6 @@
|
||||||
"+="
|
"+="
|
||||||
"-"
|
"-"
|
||||||
"-="
|
"-="
|
||||||
"->"
|
|
||||||
".."
|
".."
|
||||||
"..="
|
"..="
|
||||||
"/"
|
"/"
|
||||||
|
|
@ -276,7 +275,6 @@
|
||||||
"<="
|
"<="
|
||||||
"="
|
"="
|
||||||
"=="
|
"=="
|
||||||
"=>"
|
|
||||||
">"
|
">"
|
||||||
">="
|
">="
|
||||||
">>"
|
">>"
|
||||||
|
|
@ -297,7 +295,7 @@
|
||||||
(bracketed_type ["<" ">"] @punctuation.bracket)
|
(bracketed_type ["<" ">"] @punctuation.bracket)
|
||||||
(for_lifetimes ["<" ">"] @punctuation.bracket)
|
(for_lifetimes ["<" ">"] @punctuation.bracket)
|
||||||
|
|
||||||
["," "." ":" "::" ";"] @punctuation.delimiter
|
["," "." ":" "::" ";" "->" "=>"] @punctuation.delimiter
|
||||||
|
|
||||||
(attribute_item "#" @punctuation.special)
|
(attribute_item "#" @punctuation.special)
|
||||||
(inner_attribute_item ["!" "#"] @punctuation.special)
|
(inner_attribute_item ["!" "#"] @punctuation.special)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue