[Repo Assist] feat: enhance textDocument/implementation for .fsi ↔ .fs navigation#1494
Draft
github-actions[bot] wants to merge 2 commits intomainfrom
Draft
Conversation
…fixes #1473) TextDocumentImplementation now supports bi-directional navigation between .fs implementation files and .fsi signature files via FCS-provided properties: - In a .fsi file: navigating to the .fs implementation uses symbol.ImplementationLocation (already available from FCS) - In a .fs file: navigating to the .fsi signature uses symbol.SignatureLocation (filtered to ensure it's actually a .fsi file) When neither location is available (e.g., no paired signature file, or the symbol is abstract/virtual), the existing dispatch-slot implementation lookup runs as a fallback, preserving existing behaviour. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
🤖 Repo Assist here. The 2 macOS failures are not caused by this PR's changes:
This is a known intermittent macOS test infrastructure issue, not related to the The PR is ready for review on its merits.
|
15 tasks
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.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Closes #1473
Summary
This enhances
TextDocumentImplementation(textDocument/implementation) to support bi-directional navigation between.fsimplementation files and.fsisignature files, using FCS-provided symbol properties.Behaviour
.fsiImplementationLocation.fsimplementation.fsSignatureLocationpointing to.fsi.fsisignatureThe fallback preserves all existing
textDocument/implementationbehaviour for virtual/abstract member overrides.Implementation
FCS already exposes two properties on
FSharpSymbol:ImplementationLocation: the.fslocation for a symbol declared in a.fsifileSignatureLocation: the.fsilocation for a symbol defined in a.fsfileThe change (in
AdaptiveFSharpLspServer.fs,TextDocumentImplementationoverride):.fsi→ if so, usesImplementationLocationSignatureLocationpoints to a.fsifile → navigates thereCommands.symbolImplementationProjectpath when neither appliesTest Status
Build: ✅
dotnet build src/FsAutoComplete/FsAutoComplete.fsproj -c Release— 0 warnings, 0 errorsFormat: ✅
dotnet fantomasapplied; re-build passesFull test suite: deferred to CI (the change is in the LSP handler layer; no existing tests cover this code path directly)