Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Commit 3536247

Browse files
KevinRansomnosami
authored andcommitted
Enable language preview option for fsi in the ide (dotnet#8443)
1 parent f38de29 commit 3536247

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

LanguageService/FSharpProjectOptionsManager.fs

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ open System.Threading
2020
open Microsoft.VisualStudio.Shell.Interop
2121
open Microsoft.VisualStudio.LanguageServices.Implementation.TaskList
2222
open Microsoft.CodeAnalysis.ExternalAccess.FSharp.LanguageServices
23+
open Microsoft.VisualStudio.FSharp.Interactive.Session
2324

2425
[<AutoOpen>]
2526
module private FSharpProjectOptionsHelpers =
@@ -97,7 +98,7 @@ type private FSharpProjectOptionsReactor (_workspace: VisualStudioWorkspace, set
9798
match singleFileCache.TryGetValue(document.Id) with
9899
| false, _ ->
99100
let! sourceText = document.GetTextAsync(ct) |> Async.AwaitTask
100-
let! scriptProjectOptions, _ = checkerProvider.Checker.GetProjectOptionsFromScript(document.FilePath, sourceText.ToFSharpSourceText())
101+
let! scriptProjectOptions, _ = checkerProvider.Checker.GetProjectOptionsFromScript(document.FilePath, sourceText.ToFSharpSourceText(), SessionsProperties.fsiPreview)
101102
let projectOptions =
102103
if isScriptFile document.FilePath then
103104
scriptProjectOptions

0 commit comments

Comments
 (0)