From f33aede71c221ef0c6033183389228543fbdc9ec Mon Sep 17 00:00:00 2001 From: tmat Date: Sat, 26 Feb 2022 12:01:48 -0800 Subject: [PATCH 1/4] Use FSharpGlobalOptions.SetBackgroundAnalysisScope --- .../src/FSharp.Editor/LanguageService/LanguageService.fs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs b/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs index 1a3f54dbc9b..d0f9ab3f8d2 100644 --- a/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs +++ b/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs @@ -300,10 +300,9 @@ type internal FSharpLanguageService(package : FSharpPackage) = override this.Initialize() = base.Initialize() - this.Workspace.Options <- this.Workspace.Options.WithChangedOption(Shared.Options.FSharpServiceFeatureOnOffOptions.ClosedFileDiagnostic, FSharpConstants.FSharpLanguageName, Nullable false) - let globalOptions = package.ComponentModel.DefaultExportProvider.GetExport().Value globalOptions.BlockForCompletionItems <- false + globalOptions.SetBackgroundAnalysisScope(openFilesOnly=true) let theme = package.ComponentModel.DefaultExportProvider.GetExport().Value theme.SetColors() From cff28f01f9ec969b9ef07b618e119a4d5a77dc14 Mon Sep 17 00:00:00 2001 From: tmat Date: Sat, 26 Feb 2022 12:34:18 -0800 Subject: [PATCH 2/4] Use IFSharpEditorFormattingServiceWithOptions --- .../FSharp.Editor/Formatting/EditorFormattingService.fs | 9 ++++++--- .../src/FSharp.Editor/Formatting/IndentationService.fs | 3 --- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vsintegration/src/FSharp.Editor/Formatting/EditorFormattingService.fs b/vsintegration/src/FSharp.Editor/Formatting/EditorFormattingService.fs index b35d122d04b..69a93bde2a2 100644 --- a/vsintegration/src/FSharp.Editor/Formatting/EditorFormattingService.fs +++ b/vsintegration/src/FSharp.Editor/Formatting/EditorFormattingService.fs @@ -167,14 +167,17 @@ type internal FSharpEditorFormattingService return textChanges |> Option.defaultValue Seq.empty |> toIList } - interface IFSharpEditorFormattingService with + interface IFSharpEditorFormattingServiceWithOptions with member val SupportsFormatDocument = false member val SupportsFormatSelection = false member val SupportsFormatOnPaste = true member val SupportsFormatOnReturn = true - override _.SupportsFormattingOnTypedCharacter (document, ch) = - if FSharpIndentationService.IsSmartIndentEnabled document.Project.Solution.Workspace.Options then + override _.SupportsFormattingOnTypedCharacter (_document, _ch) = + false + + override _.SupportsFormattingOnTypedCharacter (_document, options, ch) = + if options.IndentStyle = FormattingOptions.IndentStyle.Smart then match ch with | ')' | ']' | '}' -> true | _ -> false diff --git a/vsintegration/src/FSharp.Editor/Formatting/IndentationService.fs b/vsintegration/src/FSharp.Editor/Formatting/IndentationService.fs index 1a87ac9d89d..e923077cc9c 100644 --- a/vsintegration/src/FSharp.Editor/Formatting/IndentationService.fs +++ b/vsintegration/src/FSharp.Editor/Formatting/IndentationService.fs @@ -23,9 +23,6 @@ type internal FSharpIndentationService [] () = - static member IsSmartIndentEnabled (options: Microsoft.CodeAnalysis.Options.OptionSet) = - options.GetOption(FormattingOptions.SmartIndent, FSharpConstants.FSharpLanguageName) = FormattingOptions.IndentStyle.Smart - static member IndentShouldFollow (documentId: DocumentId, sourceText: SourceText, filePath: string, position: int, parsingOptions: FSharpParsingOptions) = let lastTokenOpt = let defines = CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions From 495b6217f61f64d006e46f7dbdd9ce70ad770a8b Mon Sep 17 00:00:00 2001 From: tmat Date: Fri, 4 Mar 2022 15:25:25 -0800 Subject: [PATCH 3/4] Roslyn 4.2.0-3.22154.1 --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 91a80c39197..410201c1921 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -134,7 +134,7 @@ $(VisualStudioContractPackagesVersion) $(VisualStudioContractPackagesVersion) - 4.2.0-1.22077.2 + 4.2.0-3.22154.1 $(RoslynVersion) $(RoslynVersion) $(RoslynVersion) From f0cd1543349c7a3159410341b6f7e628b81c1681 Mon Sep 17 00:00:00 2001 From: tmat Date: Fri, 4 Mar 2022 15:35:15 -0800 Subject: [PATCH 4/4] Update dependencies --- eng/Versions.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 410201c1921..a5807b134b1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -184,7 +184,7 @@ 15.0.25123-Dev15Preview 16.0.1 16.0.28924.11111 - 17.0.63 + 17.0.64 $(VisualStudioContractPackagesVersion) 17.0.28 9.0.30729 @@ -216,8 +216,8 @@ 2.1.80 1.0.0-beta2-dev3 5.28.0.1 - 2.8.28 - 2.7.74 + 2.11.14-alpha + 2.8.57 2.4.1 5.10.3