From 9d1d9b1b9438f8c5b2d4c48fe040160b0ac6b316 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Fri, 21 May 2021 14:46:54 -0500 Subject: Rust: highlight constants --- queries/rust/highlights.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'queries/rust') diff --git a/queries/rust/highlights.scm b/queries/rust/highlights.scm index 742ad46b..4afaa10b 100644 --- a/queries/rust/highlights.scm +++ b/queries/rust/highlights.scm @@ -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 -- cgit v1.2.3