File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -514,11 +514,15 @@ module Commands =
514514 =
515515
516516 let filterSymbols symbols =
517- symbols
518- |> Array.where ( fun ( su : FSharpSymbolUse ) ->
519- su.IsFromDispatchSlotImplementation
520- || ( su.IsFromType
521- && not ( tyRes.GetParseResults.IsTypeAnnotationGivenAtPosition( su.Range.Start))))
517+ if Utils.isSignatureFile ( UMX.untag tyRes.FileName) then
518+ let implFile = Utils.toFSharpFile ( UMX.untag tyRes.FileName)
519+ symbols |> Array.filter ( fun ( su : FSharpSymbolUse ) -> su.FileName = implFile)
520+ else
521+ symbols
522+ |> Array.where ( fun ( su : FSharpSymbolUse ) ->
523+ su.IsFromDispatchSlotImplementation
524+ || ( su.IsFromType
525+ && not ( tyRes.GetParseResults.IsTypeAnnotationGivenAtPosition( su.Range.Start))))
522526
523527 async {
524528 match tyRes.TryGetSymbolUseAndUsages pos lineStr with
Original file line number Diff line number Diff line change @@ -124,6 +124,9 @@ let inline isAScript (fileName: ReadOnlySpan<char>) =
124124/// </summary>
125125let inline isSignatureFile ( fileName : ReadOnlySpan < char >) = fileName.EndsWith " .fsi"
126126
127+ let toSignatureFile fileName =
128+ IO.Path.ChangeExtension( fileName, " .fsi" )
129+
127130/// <summary>
128131/// Checks if the file ends with `.fs`
129132/// </summary>
@@ -132,6 +135,9 @@ let isFsharpFile (fileName: ReadOnlySpan<char>) = fileName.EndsWith ".fs"
132135let inline internal isFileWithFSharpI fileName = isAScript fileName || isSignatureFile fileName || isFsharpFile fileName
133136
134137
138+ let toFSharpFile fileName =
139+ IO.Path.ChangeExtension( fileName, " .fs" )
140+
135141/// <summary>
136142/// This is a combination of `isAScript`, `isSignatureFile`, and `isFsharpFile`
137143/// </summary>
You can’t perform that action at this time.
0 commit comments