Rust: highlight constants

This commit is contained in:
Santos Gallegos 2021-05-21 14:46:54 -05:00 committed by Thomas Vigouroux
parent 9a3acbc48d
commit 9d1d9b1b94

View file

@ -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