aboutsummaryrefslogtreecommitdiffstats
path: root/queries/cpp/highlights.scm
diff options
context:
space:
mode:
authorJohn Drouhard <john@drouhard.dev>2023-03-26 13:32:22 -0500
committerAmaan Qureshi <amaanq12@gmail.com>2023-03-27 10:20:38 -0400
commit300ba8d5a5e8cc7e91fbed932e2b05a39ca70e0b (patch)
tree07621830f7a1f39f20e2b902d595a1ed25f33b98 /queries/cpp/highlights.scm
parentfeat(scala): add in local variables queries (diff)
downloadnvim-treesitter-300ba8d5a5e8cc7e91fbed932e2b05a39ca70e0b.tar
nvim-treesitter-300ba8d5a5e8cc7e91fbed932e2b05a39ca70e0b.tar.gz
nvim-treesitter-300ba8d5a5e8cc7e91fbed932e2b05a39ca70e0b.tar.bz2
nvim-treesitter-300ba8d5a5e8cc7e91fbed932e2b05a39ca70e0b.tar.lz
nvim-treesitter-300ba8d5a5e8cc7e91fbed932e2b05a39ca70e0b.tar.xz
nvim-treesitter-300ba8d5a5e8cc7e91fbed932e2b05a39ca70e0b.tar.zst
nvim-treesitter-300ba8d5a5e8cc7e91fbed932e2b05a39ca70e0b.zip
feat(cpp): simplify namespace query rules now that parser is a bit more consistent
Diffstat (limited to 'queries/cpp/highlights.scm')
-rw-r--r--queries/cpp/highlights.scm5
1 files changed, 1 insertions, 4 deletions
diff --git a/queries/cpp/highlights.scm b/queries/cpp/highlights.scm
index c40ab26f1..854e03cb3 100644
--- a/queries/cpp/highlights.scm
+++ b/queries/cpp/highlights.scm
@@ -45,12 +45,9 @@
(namespace_identifier) @namespace
((namespace_identifier) @type
(#lua-match? @type "^[A-Z]"))
-((namespace_identifier) @constant
- (#lua-match? @constant "^[A-Z][A-Z_0-9]*$"))
+
(case_statement
value: (qualified_identifier (identifier) @constant))
-(namespace_definition
- name: (identifier) @namespace)
(using_declaration . "using" . "namespace" . [(qualified_identifier) (identifier)] @namespace)