summaryrefslogtreecommitdiff
path: root/queries/rust
diff options
context:
space:
mode:
authorSantos Gallegos <stsewd@protonmail.com>2021-05-21 14:46:54 -0500
committerThomas Vigouroux <tomvig38@gmail.com>2021-05-22 13:17:15 +0200
commit9d1d9b1b9438f8c5b2d4c48fe040160b0ac6b316 (patch)
tree030c4a7ae6ec625e61d63cb0e6dbc4ae686ca505 /queries/rust
parent9a3acbc48d61995d98cf073fef8b0b57b3cfb0b9 (diff)
Rust: highlight constants
Diffstat (limited to 'queries/rust')
-rw-r--r--queries/rust/highlights.scm4
1 files changed, 3 insertions, 1 deletions
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