go: Fix outline for methods with unnamed receivers (#58656)

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

This fixes Go outline extraction for methods whose receiver has no name,
such as `func (v2) Method()`. These methods are now included in outline
symbols, which also feed breadcrumbs and sticky
scroll.

Tested with:

- `cargo test -p languages`
- `cargo test -p grammars`
- `./script/clippy -p languages`
- `cargo fmt --check --package languages`

Before:

[before_cut.webm](https://github.com/user-attachments/assets/91eb5cb0-703a-4496-b0dd-5369c4c219fc)

After:

[after_cut.webm](https://github.com/user-attachments/assets/76d13d88-3671-4118-99fc-c073a6e64727)

Release Notes:

- Fixed Go methods with unnamed receivers not appearing in breadcrumbs
and sticky scroll.

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
35ddcb2ecdolegator888 committed on 7/8/2026, 12:21:46 PM· committed by GitHubparent2243c13
2 files changedLine totals unavailable