Skip to content

extension: support follow cursor and sorting in package outline#4008

Closed
aviralgarg05 wants to merge 4 commits into
golang:masterfrom
aviralgarg05:aviralgarg/package-outline-follow-cursor-sort
Closed

extension: support follow cursor and sorting in package outline#4008
aviralgarg05 wants to merge 4 commits into
golang:masterfrom
aviralgarg05:aviralgarg/package-outline-follow-cursor-sort

Conversation

@aviralgarg05
Copy link
Copy Markdown
Contributor

@aviralgarg05 aviralgarg05 commented Mar 30, 2026

Package Outline now supports follow cursor, sort by name, and sort by
position, matching the controls available in Outline.

This change switches the Package Outline view to a TreeView so the active
symbol can be revealed as the cursor moves. It also adds view actions for
follow cursor and both sort modes, and keeps symbol ordering stable by
name or source position.

The cursor matching logic also handles receiver methods returned by
gopls.package_symbols, where methods may be grouped under a type without
being nested inside that type's source range.

Fixes #3998

@gopherbot
Copy link
Copy Markdown
Collaborator

This PR (HEAD: 4f62268) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/vscode-go/+/761181.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Gopher Robot:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Aviral Garg:

Patch Set 1:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 2: Commit-Queue+1

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Go LUCI:

Patch Set 2:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2026-04-09T20:56:51Z","revision":"118fef909d333f56035f8cfda19c6703413f2c20"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 2: -Commit-Queue

(Performed by <GERRIT_ACCOUNT_60063> on behalf of <GERRIT_ACCOUNT_3771561>)


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Go LUCI:

Patch Set 2:

This CL has failed the run. Reason:

Tryjob golang/try/x_vscode-go-go1.25-linux-amd64_docker has failed with summary (view all results):


To reproduce, try gomote repro 8684965782592232513.

Additional links for debugging:


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Go LUCI:

Patch Set 2: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

This PR (HEAD: 74db76a) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/vscode-go/+/761181.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Aviral Garg:

Patch Set 2:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

This PR (HEAD: 6291440) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/vscode-go/+/761181.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Aviral Garg:

Patch Set 4:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 4:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 4: Code-Review+2 Commit-Queue+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Go LUCI:

Patch Set 4:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2026-04-14T20:16:25Z","revision":"c1e271a9fbc51c624c1aba78a15b116e6f667e79"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 4: -Commit-Queue

(Performed by <GERRIT_ACCOUNT_60063> on behalf of <GERRIT_ACCOUNT_3771561>)


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Go LUCI:

Patch Set 4:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Go LUCI:

Patch Set 4: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

This PR (HEAD: 6f9c67f) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/vscode-go/+/761181.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Aviral Garg:

Patch Set 5:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 5: Code-Review+2


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 5: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Go LUCI:

Patch Set 5:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2026-04-27T15:13:32Z","revision":"faa9cd45884a69be44bb80c226e81177425626fc"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 5: -Commit-Queue

(Performed by <GERRIT_ACCOUNT_60063> on behalf of <GERRIT_ACCOUNT_3771561>)


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Go LUCI:

Patch Set 5:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Go LUCI:

Patch Set 5: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Carlos Amedee:

Patch Set 5: Code-Review+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/761181.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request May 14, 2026
Package Outline now supports follow cursor, sort by name, and sort by
position, matching the controls available in Outline.

This change switches the Package Outline view to a TreeView so the active
symbol can be revealed as the cursor moves. It also adds view actions for
follow cursor and both sort modes, and keeps symbol ordering stable by
name or source position.

The cursor matching logic also handles receiver methods returned by
gopls.package_symbols, where methods may be grouped under a type without
being nested inside that type's source range.

Fixes #3998

Change-Id: I0ed9cc1526dd84bac44a29cec918b53465b81274
GitHub-Last-Rev: 6f9c67f
GitHub-Pull-Request: #4008
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/761181
Reviewed-by: Madeline Kalil <mkalil@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Hongxiang Jiang <hxjiang@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
@gopherbot
Copy link
Copy Markdown
Collaborator

This PR is being closed because golang.org/cl/761181 has been merged.

@gopherbot gopherbot closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package Outline follow cursor and sort by name

2 participants