Closed TheAngryByrd closed 11 months ago
I confess that I have a hard time reasoning about the 'directions' (incoming/outgoing) and matching them to the FCS calls going on here.
Incoming is like walking the call tree back to its roots. (So a recursive fine all references essentially).
Outgoing is like walking the call tree to its leaves. (So a recursive find all functions called).
I might actually punt on the Outgoing for the moment because it isnβt really possible without the typed tree (as far as I can tell), As that disables partial type checking.
Version
to DiagnosticCollection
. We occasionally get TextSync issues, while I think there's something else going on, I think stopping it at the DiagnosticCollection
will stop it from being a problem.
Definitely need a parsing/typed expert here.
keepAssemblyContents
to need to be set to true in theFSharpChecker
(losingenablePartialTypeChecking
in the process since they're mutually exclusive).WHAT
π€ Generated by Copilot at c68553f
This pull request enhances the F# language server by adding the call hierarchy feature and by refactoring the file management logic. It modifies the
AdaptiveFSharpLspServer
type to keep track of both open and closed files and to use this information for various language features. It also updates theCommon.fs
file to enable theCallHierarchyProvider
capability.π€ Generated by Copilot at c68553f
πβ»οΈπ
WHY
HOW
π€ Generated by Copilot at c68553f
AdaptiveFSharpLspServer
type to store and update information about both open and closed F# files in the workspace, and to simplify the logic of getting the project options, parsed results, and declarations for any file path. (link, link, link, link, link, link, link)CallHierarchyIncomingCalls
andTextDocumentPrepareCallHierarchy
methods in theAdaptiveFSharpLspServer
type to provide the functionality of finding the callers and callees of a given symbol in the workspace, using the existing parsing, type checking, and symbol use logic. (link)workspaceSymbol
function in theAdaptiveFSharpLspServer
type to use the new functiongetAllDeclarations
instead of the old functiongetAllOpenDeclarations
, to improve the accuracy of the workspace symbol search feature. (link)CallHierarchyProvider
capability to theHelpers
module in theCommon.fs
file, to enable the language server to advertise its support for the call hierarchy feature to the LSP client. (link)AdaptiveFSharpLspServer
type, likely as a formatting or style adjustment. (link)