mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 02:10:15 -04:00
Rust: Add variable and closure parameter highlights
This commit is contained in:
parent
0bab8e56b2
commit
0e3dd8d3fa
1 changed files with 2 additions and 0 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
; Identifier conventions
|
; Identifier conventions
|
||||||
|
|
||||||
|
(identifier) @variable
|
||||||
; Assume all-caps names are constants
|
; Assume all-caps names are constants
|
||||||
((identifier) @constant
|
((identifier) @constant
|
||||||
(#vim-match? @constant "^[A-Z][A-Z\\d_]+$'"))
|
(#vim-match? @constant "^[A-Z][A-Z\\d_]+$'"))
|
||||||
|
|
@ -123,6 +124,7 @@
|
||||||
] @punctuation.delimiter
|
] @punctuation.delimiter
|
||||||
|
|
||||||
(parameter (identifier) @parameter)
|
(parameter (identifier) @parameter)
|
||||||
|
(closure_parameters (identifier) @parameter)
|
||||||
|
|
||||||
(lifetime (identifier) @label)
|
(lifetime (identifier) @label)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue