From 954b8c718f09e3cb3c699d91b01b283bd48146a0 Mon Sep 17 00:00:00 2001 From: winwisely268 Date: Wed, 22 Jul 2020 08:52:53 +0000 Subject: [PATCH] fixes golang method highlights (overwritten by parameter in the ordering) --- queries/go/highlights.scm | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/queries/go/highlights.scm b/queries/go/highlights.scm index ed046e6d0..fb5df7f11 100644 --- a/queries/go/highlights.scm +++ b/queries/go/highlights.scm @@ -2,6 +2,21 @@ ;; Copyright (c) 2014 Max Brunsfeld (The MIT License) ;; +; Identifiers + +(type_identifier) @type +(field_identifier) @property +(identifier) @variable + +(parameter_declaration (identifier) @parameter) +(variadic_parameter_declaration (identifier) @parameter) + +((identifier) @constant + (#eq? @constant "_")) + +((identifier) @constant + (#match? @constant "^[A-Z][A-Z\\d_]+$")) + ; Function calls (call_expression @@ -19,21 +34,6 @@ (method_declaration name: (field_identifier) @method) -; Identifiers - -(type_identifier) @type -(field_identifier) @property -(identifier) @variable - -(parameter_declaration (identifier) @parameter) -(variadic_parameter_declaration (identifier) @parameter) - -((identifier) @constant - (#eq? @constant "_")) - -((identifier) @constant - (#match? @constant "^[A-Z][A-Z\\d_]+$")) - ; Operators "--" @operator