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.
This commit is contained in:
Cole Miller 2025-07-07 09:51:30 -04:00 committed by GitHub
parent c99e42a3d6
commit 955580dae6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,7 +25,7 @@
receiver: (parameter_list
"(" @context
(parameter_declaration
name: (_) @name
name: (_) @context
type: (_) @context)
")" @context)
name: (field_identifier) @name