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 @@ -515,11 +515,15 @@ module Commands =
515515 =
516516
517517 let filterSymbols symbols =
518- symbols
519- |> Array.where ( fun ( su : FSharpSymbolUse ) ->
520- su.IsFromDispatchSlotImplementation
521- || ( su.IsFromType
522- && not ( tyRes.GetParseResults.IsTypeAnnotationGivenAtPosition( su.Range.Start))))
518+ if Utils.isSignatureFile ( UMX.untag tyRes.FileName) then
519+ let implFile = Utils.toFSharpFile ( UMX.untag tyRes.FileName)
520+ symbols |> Array.filter ( fun ( su : FSharpSymbolUse ) -> su.FileName = implFile)
521+ else
522+ symbols
523+ |> Array.where ( fun ( su : FSharpSymbolUse ) ->
524+ su.IsFromDispatchSlotImplementation
525+ || ( su.IsFromType
526+ && not ( tyRes.GetParseResults.IsTypeAnnotationGivenAtPosition( su.Range.Start))))
523527
524528 async {
525529 match tyRes.TryGetSymbolUseAndUsages pos lineStr with
Original file line number Diff line number Diff line change @@ -119,11 +119,17 @@ let isAScript (fileName: string) =
119119/// </summary>
120120let isSignatureFile ( fileName : string ) = fileName.EndsWith " .fsi"
121121
122+ let toSignatureFile fileName =
123+ IO.Path.ChangeExtension( fileName, " .fsi" )
124+
122125/// <summary>
123126/// Checks if the file ends with `.fs`
124127/// </summary>
125128let isFsharpFile ( fileName : string ) = fileName.EndsWith " .fs"
126129
130+ let toFSharpFile fileName =
131+ IO.Path.ChangeExtension( fileName, " .fs" )
132+
127133/// <summary>
128134/// This is a combination of `isAScript`, `isSignatureFile`, and `isFsharpFile`
129135/// </summary>
You can’t perform that action at this time.
0 commit comments