@@ -908,6 +908,9 @@ type TypeCheckInfo
908908match itemwith
909909| Item.Types_ | Item.ModuleOrNamespaces_ -> true
910910| _ -> false
911+
912+ /// Find the most precise display context for the given line and column.
913+ member __.GetBestDisplayEnvForPos cursorPos = GetBestEnvForPos cursorPos
911914
912915member __.GetVisibleNamespacesAndModulesAtPosition ( cursorPos : pos ) : ModuleOrNamespaceRef list =
913916let ( nenv , ad ), m = GetBestEnvForPos cursorPos
@@ -1982,6 +1985,7 @@ type FSharpCheckFileResults(filename: string, errors: FSharpErrorInfo[], scopeOp
19821985| _ ->
19831986 async.Return dflt
19841987
1988+
19851989member info.GetToolTipText ( line , colAtEndOfNames , lineStr , names , tokenTag , userOpName ) =
19861990 info.GetStructuredToolTipText( line, colAtEndOfNames, lineStr, names, tokenTag, ?userOpName= userOpName)
19871991|> Tooltips.Map Tooltips.ToFSharpToolTipText
@@ -2093,6 +2097,13 @@ type FSharpCheckFileResults(filename: string, errors: FSharpErrorInfo[], scopeOp
20932097 RequireCompilationThread ctok
20942098 scope.IsRelativeNameResolvableFromSymbol( pos, plid, symbol))
20952099
2100+ member info.GetDisplayEnvForPos ( pos : pos ) : Async < DisplayEnv option > =
2101+ let userOpName = " CodeLens"
2102+ reactorOp userOpName" GetDisplayContextAtPos" None( fun ctok scope ->
2103+ DoesNotRequireCompilerThreadTokenAndCouldPossiblyBeMadeConcurrent ctok
2104+ let ( nenv , _ ), _ = scope.GetBestDisplayEnvForPos pos
2105+ Some nenv.DisplayEnv)
2106+
20962107member info.ImplementationFiles =
20972108if not keepAssemblyContentsthen invalidOp" The 'keepAssemblyContents' flag must be set to true on the FSharpChecker in order to access the checked contents of assemblies"
20982109 scopeOptX