Give Navigate To the counts it sorts equal F# matches by - #20532
Draft
xperiandri wants to merge 4 commits into
Draft
xperiandri wants to merge 4 commits into
xperiandri wants to merge 4 commits into
Conversation
Navigate To orders matches that are otherwise equal by these counts for C# and VB. NavigableItem now carries them: every curried and tupled argument of the method a declaration compiles to, without the instance and without a solitary unit argument, and its explicitly declared type parameters. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Navigate To orders matches of the same kind by the folder distance to the file being edited, then by parameter and type parameter count and name, for C# and VB. Roslyn computes the same key for F# results once they carry the counts, which NavigableItem now records. Needs the FSharpNavigateToSearchResult constructor that takes the counts, from dotnet/roslyn#85280. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
❗ Release notes requiredYou can open this PR in browser to add release notes: open in github.dev
Warning No PR link found in some release notes, please consider adding it.
|
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
T-Gro
requested changes
Sep 15, 2026
T-Gro
left a comment
Member
There was a problem hiding this comment.
🤖🕵️ Please shorten the description using this guidance. Focus on the problem and why the change is needed, in simplified technical English. Leave the implementation inventory to the Files tab and retain necessary caveats.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Navigate To (Ctrl+T) orders matches of the same kind by a secondary sort. For C# and VB it puts a match in the file being edited first, then orders by how far the match's folder is from that file, by parameter and type parameter count, and by name. F# results carried no secondary sort, so a name declared both in the file being edited and elsewhere was listed in no particular order.
dotnet/roslyn#85280 has Roslyn compute that key for F# results too, from the active document it already knows, and adds a
FSharpNavigateToSearchResultconstructor for the two counts. #20531 records the counts onNavigableItem. This passes them on.Stacked on #20531: the first two commits are that PR.
Checklist
NavigateToSearchServiceTestschecks that a result carries its counts. The ordering is Roslyn's, and Sort F# Navigate To results the way C# and VB results are sorted roslyn#85280 tests it.Draft
This cannot build until dotnet/roslyn#85280 has flowed. Against a local build of dotnet/roslyn#85280 and #85281 together, the affected
FSharp.Editor.Testsclasses pass (145): Navigate To search, persistent cache, loading search and multi-target search, Find All References and multi-target Find All References, semantic classification, Copilot mentions, and the new tests.🤖 Generated with Claude Code