aboutsummaryrefslogtreecommitdiffstats
path: root/queries/cpp
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2020-11-18 19:07:24 +0100
committerThomas Vigouroux <tomvig38@gmail.com>2020-11-18 21:54:04 +0100
commit289cdc9da8f7f21dcbf814032e9277ef0e9790a0 (patch)
treef0845d4e9d0c705efcca4721b197e6719d35b16d /queries/cpp
parentfix(predicates): Fix #446: highlight property only if not a method (diff)
downloadnvim-treesitter-289cdc9da8f7f21dcbf814032e9277ef0e9790a0.tar
nvim-treesitter-289cdc9da8f7f21dcbf814032e9277ef0e9790a0.tar.gz
nvim-treesitter-289cdc9da8f7f21dcbf814032e9277ef0e9790a0.tar.bz2
nvim-treesitter-289cdc9da8f7f21dcbf814032e9277ef0e9790a0.tar.lz
nvim-treesitter-289cdc9da8f7f21dcbf814032e9277ef0e9790a0.tar.xz
nvim-treesitter-289cdc9da8f7f21dcbf814032e9277ef0e9790a0.tar.zst
nvim-treesitter-289cdc9da8f7f21dcbf814032e9277ef0e9790a0.zip
Do not highlight Uppercase function as type
Diffstat (limited to 'queries/cpp')
-rw-r--r--queries/cpp/highlights.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/queries/cpp/highlights.scm b/queries/cpp/highlights.scm
index e4936b98e..05d50426a 100644
--- a/queries/cpp/highlights.scm
+++ b/queries/cpp/highlights.scm
@@ -25,14 +25,16 @@
(((field_expression
(field_identifier) @method)) @_parent
- (has-parent? @_parent template_method function_declarator call_expression))
+ (#has-parent? @_parent template_method function_declarator call_expression))
(template_function
name: (scoped_identifier
name: (identifier) @function))
-((identifier) @type (#match? @type "^[A-Z]"))
+((identifier) @type
+ (#match? @type "^[A-Z]")
+ (#not-has-parent? @type function_declarator))
(namespace_identifier) @namespace
((namespace_identifier) @type
@@ -148,5 +150,5 @@
; Annotations (not fully supported by parser)
((ERROR) @attribute
- (vim-match? @attribute "\[?\[.*\]\]?.*$"))
+ (#vim-match? @attribute "\[?\[.*\]\]?.*$"))
(attribute) @attribute