feat: Categorize Rust's keywords using more specific scopes (#4510)

This commit is contained in:
Poliorcetics 2022-10-29 17:36:26 +02:00 committed by GitHub
parent e3eaad1479
commit 2935e9da19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,23 +111,31 @@
; -------
(for_expression
"for" @keyword.control)
"for" @keyword.control.repeat)
((identifier) @keyword.control
(#match? @keyword.control "^yield$"))
[
"while"
"loop"
"in"
"break"
"continue"
"in" @keyword.control
[
"match"
"if"
"else"
] @keyword.control.conditional
[
"while"
"loop"
] @keyword.control.repeat
[
"break"
"continue"
"return"
"await"
] @keyword.control
] @keyword.control.return
"use" @keyword.control.import
(mod_item "mod" @keyword.control.import !body)
@ -143,24 +151,28 @@
"mod"
"extern"
"struct"
"enum"
"impl"
"where"
"trait"
"for"
"type"
"union"
"unsafe"
"default"
"macro_rules!"
"let"
"async"
] @keyword
[
"struct"
"enum"
"union"
"type"
] @keyword.storage.type
"let" @keyword.storage
"fn" @keyword.function
(mutable_specifier) @keyword.storage.modifier.mut