summaryrefslogtreecommitdiffstats
path: root/queries/rust
diff options
context:
space:
mode:
authorJaehwang Jung <tomtomjhj@gmail.com>2023-04-08 14:23:05 +0900
committerStephan Seitz <stephan.seitz@fau.de>2023-04-09 08:12:17 -0700
commitfa9fe9a95ba481e26e11eede4657f8c5350a0eaa (patch)
tree1cf1da97fc4769a41486a53387cc64430c5a251d /queries/rust
parentfeat(markdown_inline): add @nospell where appropriate (diff)
downloadnvim-treesitter-fa9fe9a95ba481e26e11eede4657f8c5350a0eaa.tar
nvim-treesitter-fa9fe9a95ba481e26e11eede4657f8c5350a0eaa.tar.gz
nvim-treesitter-fa9fe9a95ba481e26e11eede4657f8c5350a0eaa.tar.bz2
nvim-treesitter-fa9fe9a95ba481e26e11eede4657f8c5350a0eaa.tar.lz
nvim-treesitter-fa9fe9a95ba481e26e11eede4657f8c5350a0eaa.tar.xz
nvim-treesitter-fa9fe9a95ba481e26e11eede4657f8c5350a0eaa.tar.zst
nvim-treesitter-fa9fe9a95ba481e26e11eede4657f8c5350a0eaa.zip
fix(rust): highlight SNAKE_CASE scoped identifier name as @constant
Diffstat (limited to 'queries/rust')
-rw-r--r--queries/rust/highlights.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/queries/rust/highlights.scm b/queries/rust/highlights.scm
index 1a9330a70..6c4491a02 100644
--- a/queries/rust/highlights.scm
+++ b/queries/rust/highlights.scm
@@ -82,6 +82,9 @@
((scoped_identifier
name: (identifier) @type)
(#lua-match? @type "^[A-Z]"))
+((scoped_identifier
+ name: (identifier) @constant)
+ (#lua-match? @constant "^[A-Z][A-Z%d_]*$"))
[
(crate)