From 33ffdce6906b0946a6503c73b7fc71250cc938aa Mon Sep 17 00:00:00 2001 From: John Drouhard Date: Thu, 19 Nov 2020 09:50:47 -0600 Subject: c/cpp highlights: Fix field declarations and initializers After a recent fix for #446, declarations in class/struct definitions stopped being marked as properties or methods. This fix will add property highlights to field declarations, and method highlight to field function declarations. --- queries/cpp/highlights.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'queries/cpp/highlights.scm') diff --git a/queries/cpp/highlights.scm b/queries/cpp/highlights.scm index 05d50426a..81e4c544d 100644 --- a/queries/cpp/highlights.scm +++ b/queries/cpp/highlights.scm @@ -27,6 +27,12 @@ (field_identifier) @method)) @_parent (#has-parent? @_parent template_method function_declarator call_expression)) +(field_initializer + (field_identifier) @property) + +(function_declarator + declarator: (field_identifier) @method) + (template_function name: (scoped_identifier name: (identifier) @function)) -- cgit v1.2.3-70-g09d2