mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
rust: use @type.qualifier and @storageclass
This commit is contained in:
parent
00add7e4b4
commit
00b42ac6d4
2 changed files with 21 additions and 13 deletions
|
|
@ -156,15 +156,16 @@ effect on highlighting. We will work on improving highlighting in the near futur
|
||||||
#### Types
|
#### Types
|
||||||
|
|
||||||
```scheme
|
```scheme
|
||||||
@type ; type or class definitions and annotations
|
@type ; type or class definitions and annotations
|
||||||
@type.builtin ; built-in types
|
@type.builtin ; built-in types
|
||||||
@type.definition ; type definitions (e.g. `typedef` in C)
|
@type.definition ; type definitions (e.g. `typedef` in C)
|
||||||
@type.qualifier ; type qualifiers (e.g. `const`)
|
@type.qualifier ; type qualifiers (e.g. `const`)
|
||||||
|
|
||||||
@storageclass ; visibility/life-time/etc. modifiers (e.g. `static`)
|
@storageclass ; visibility/life-time modifiers
|
||||||
@attribute ; attribute annotations (e.g. Python decorators)
|
@storageclass.lifetime ; life-time modifiers (e.g. `static`)
|
||||||
@field ; object and struct fields
|
@attribute ; attribute annotations (e.g. Python decorators)
|
||||||
@property ; similar to `@field`
|
@field ; object and struct fields
|
||||||
|
@property ; similar to `@field`
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Identifiers
|
#### Identifiers
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
|
|
||||||
(self) @variable.builtin
|
(self) @variable.builtin
|
||||||
|
|
||||||
(lifetime ["'" (identifier)] @label)
|
|
||||||
(loop_label ["'" (identifier)] @label)
|
(loop_label ["'" (identifier)] @label)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -172,7 +171,6 @@
|
||||||
[
|
[
|
||||||
"async"
|
"async"
|
||||||
"await"
|
"await"
|
||||||
"const"
|
|
||||||
"default"
|
"default"
|
||||||
"dyn"
|
"dyn"
|
||||||
"enum"
|
"enum"
|
||||||
|
|
@ -182,17 +180,26 @@
|
||||||
"match"
|
"match"
|
||||||
"move"
|
"move"
|
||||||
"pub"
|
"pub"
|
||||||
"ref"
|
|
||||||
"static"
|
|
||||||
"struct"
|
"struct"
|
||||||
"trait"
|
"trait"
|
||||||
"type"
|
"type"
|
||||||
"union"
|
"union"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
"where"
|
"where"
|
||||||
(mutable_specifier)
|
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"ref"
|
||||||
|
(mutable_specifier)
|
||||||
|
] @type.qualifier
|
||||||
|
|
||||||
|
[
|
||||||
|
"const"
|
||||||
|
"static"
|
||||||
|
] @storageclass
|
||||||
|
|
||||||
|
(lifetime ["'" (identifier)] @storageclass.lifetime)
|
||||||
|
|
||||||
"fn" @keyword.function
|
"fn" @keyword.function
|
||||||
[
|
[
|
||||||
"return"
|
"return"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue