File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -516,11 +516,16 @@ module Commands =
516516 =
517517
518518 let filterSymbols symbols =
519- symbols
520- |> Array.where ( fun ( su : FSharpSymbolUse ) ->
521- su.IsFromDispatchSlotImplementation
522- || ( su.IsFromType
523- && not ( tyRes.GetParseResults.IsTypeAnnotationGivenAtPosition( su.Range.Start))))
519+ if Utils.isSignatureFile ( UMX.untag tyRes.FileName) then
520+ let implFile = Utils.toFSharpFile ( UMX.untag tyRes.FileName)
521+ symbols
522+ |> Array.filter ( fun ( su : FSharpSymbolUse ) -> su.FileName = implFile)
523+ else
524+ symbols
525+ |> Array.where ( fun ( su : FSharpSymbolUse ) ->
526+ su.IsFromDispatchSlotImplementation
527+ || ( su.IsFromType
528+ && not ( tyRes.GetParseResults.IsTypeAnnotationGivenAtPosition( su.Range.Start))))
524529
525530 async {
526531 match tyRes.TryGetSymbolUseAndUsages pos lineStr with
Original file line number Diff line number Diff line change @@ -120,12 +120,15 @@ let isAScript (fileName: string) =
120120/// Checks if the file ends with `.fsi`
121121/// </summary>
122122let isSignatureFile ( fileName : string ) = fileName.EndsWith " .fsi"
123+ let toSignatureFile fileName = IO.Path.ChangeExtension( fileName, " .fsi" )
123124
124125/// <summary>
125126/// Checks if the file ends with `.fs`
126127/// </summary>
127128let isFsharpFile ( fileName : string ) = fileName.EndsWith " .fs"
128129
130+ let toFSharpFile fileName = IO.Path.ChangeExtension( fileName, " .fs" )
131+
129132/// <summary>
130133/// This is a combination of `isAScript`, `isSignatureFile`, and `isFsharpFile`
131134/// </summary>
You can’t perform that action at this time.
0 commit comments