mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-08 06:20:01 -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) @variable
|
||||
(const_item
|
||||
name: (identifier) @constant)
|
||||
; Assume all-caps names are constants
|
||||
((identifier) @constant
|
||||
(#vim-match? @constant "^[A-Z][A-Z\\d_]+$'"))
|
||||
(#match? @constant "^[A-Z][A-Z\\d_]+$'"))
|
||||
|
||||
; Other identifiers
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue