aboutsummaryrefslogtreecommitdiffstats
path: root/queries/rust/highlights.scm
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/highlights.scm
parentUpdate lockfile.json (diff)
downloadnvim-treesitter-9d1d9b1b9438f8c5b2d4c48fe040160b0ac6b316.tar
nvim-treesitter-9d1d9b1b9438f8c5b2d4c48fe040160b0ac6b316.tar.gz
nvim-treesitter-9d1d9b1b9438f8c5b2d4c48fe040160b0ac6b316.tar.bz2
nvim-treesitter-9d1d9b1b9438f8c5b2d4c48fe040160b0ac6b316.tar.lz
nvim-treesitter-9d1d9b1b9438f8c5b2d4c48fe040160b0ac6b316.tar.xz
nvim-treesitter-9d1d9b1b9438f8c5b2d4c48fe040160b0ac6b316.tar.zst
nvim-treesitter-9d1d9b1b9438f8c5b2d4c48fe040160b0ac6b316.zip
Rust: highlight constants
Diffstat (limited to 'queries/rust/highlights.scm')
-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 742ad46be..4afaa10bf 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