From 712914a1f7717702a101a77224288d5660f88bca Mon Sep 17 00:00:00 2001 From: Tomas Virgl <739690+tvi@users.noreply.github.com> Date: Thu, 19 Feb 2026 16:53:33 +0100 Subject: [PATCH] go: split definition and call highlights for functions, methods, and types (#49120) This allows definitions to use a different highlight than function calls. Release Notes: - go: Add definition highlights for functions, methods, and types --- crates/languages/src/go/highlights.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/languages/src/go/highlights.scm b/crates/languages/src/go/highlights.scm index e861625ecc7bfa5b72ab0fa15df401305258510a..15a512d6b7e359bf7290aee9d433f1ae7be352ec 100644 --- a/crates/languages/src/go/highlights.scm +++ b/crates/languages/src/go/highlights.scm @@ -1,6 +1,9 @@ (identifier) @variable (type_identifier) @type +(type_spec + name: (type_identifier) @type.definition) + (field_identifier) @property (package_identifier) @namespace @@ -12,11 +15,11 @@ (identifier) @property)) (call_expression - function: (identifier) @function) + function: (identifier) @function.call) (call_expression function: (selector_expression - field: (field_identifier) @function.method)) + field: (field_identifier) @function.method.call)) (function_declaration name: (identifier) @function)