From e2cf8977fda35ad666d7b431b0254d8da710968a Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Mon, 1 May 2023 00:20:51 -0400 Subject: [PATCH] feat(go): highlight constructors, remove _ as `@constant` --- queries/go/highlights.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/queries/go/highlights.scm b/queries/go/highlights.scm index ce4ae89b6..f2bdf6a83 100644 --- a/queries/go/highlights.scm +++ b/queries/go/highlights.scm @@ -15,9 +15,6 @@ (label_name) @label -((identifier) @constant - (#eq? @constant "_")) - (const_spec name: (identifier) @constant) @@ -41,6 +38,14 @@ (method_spec name: (field_identifier) @method) +; Constructors + +((call_expression (identifier) @constructor) + (#lua-match? @constructor "^[nN]ew.+$")) + +((call_expression (identifier) @constructor) + (#lua-match? @constructor "^[mM]ake.+$")) + ; Operators [