From 955580dae6f8e9faf8a64d145f287d3710c08c11 Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Mon, 7 Jul 2025 09:51:30 -0400 Subject: [PATCH] Adjust Go outline query for method definition to avoid pesky whitespace (#33971) Closes #33951 There's an adjustment that kicks in to extend `name_ranges` when we capture more than one `@name` for an outline `@item`. That was happening here because we captured both the parameter name for the method receiver and the name of the method as `@name`. It seems like only the second one should have that annotation. Release Notes: - Fixed extraneous leading space in `$ZED_SYMBOL` when used with Go methods. --- crates/languages/src/go/outline.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/languages/src/go/outline.scm b/crates/languages/src/go/outline.scm index 0e4d6a52f3b5d48538c30d658f98ec3692b966c6..e37ae7e5723027af3227f947898b301c0305a4f5 100644 --- a/crates/languages/src/go/outline.scm +++ b/crates/languages/src/go/outline.scm @@ -25,7 +25,7 @@ receiver: (parameter_list "(" @context (parameter_declaration - name: (_) @name + name: (_) @context type: (_) @context) ")" @context) name: (field_identifier) @name