Skip to content

Commit 955580d

Browse files
authored
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.
1 parent c99e42a commit 955580d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/languages/src/go/outline.scm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
receiver: (parameter_list
2626
"(" @context
2727
(parameter_declaration
28-
name: (_) @name
28+
name: (_) @context
2929
type: (_) @context)
3030
")" @context)
3131
name: (field_identifier) @name

0 commit comments

Comments
 (0)