mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 20:00:07 -04:00
Rust: highlight constants
This commit is contained in:
parent
9a3acbc48d
commit
9d1d9b1b94
1 changed files with 3 additions and 1 deletions
|
|
@ -5,9 +5,11 @@
|
||||||
; Identifier conventions
|
; Identifier conventions
|
||||||
|
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
|
(const_item
|
||||||
|
name: (identifier) @constant)
|
||||||
; Assume all-caps names are constants
|
; Assume all-caps names are constants
|
||||||
((identifier) @constant
|
((identifier) @constant
|
||||||
(#vim-match? @constant "^[A-Z][A-Z\\d_]+$'"))
|
(#match? @constant "^[A-Z][A-Z\\d_]+$'"))
|
||||||
|
|
||||||
; Other identifiers
|
; Other identifiers
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue