From 141a25b0814720ca256d4090bb7aa5a49a91b7bf Mon Sep 17 00:00:00 2001 From: David Barbet Date: Tue, 1 Nov 2022 18:32:08 -0700 Subject: [PATCH] Use new roslyn packages to fix option reading exceptions --- server/Directory.Packages.props | 6 ++++-- .../LanguageServer/ServerCapabilitiesProvider.cs | 3 +++ .../Microsoft.CodeAnalysis.LanguageServer.csproj | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/server/Directory.Packages.props b/server/Directory.Packages.props index 9d4d8cd03..2f4548809 100644 --- a/server/Directory.Packages.props +++ b/server/Directory.Packages.props @@ -2,9 +2,11 @@ 1.5.5 - 4.5.0-1.22524.1 + 4.5.0-2.22552.19 $(MicrosoftCodeAnalysisVersion) $(MicrosoftCodeAnalysisVersion) + $(MicrosoftCodeAnalysisVersion) + $(MicrosoftCodeAnalysisVersion) $(MicrosoftCodeAnalysisVersion) $(MicrosoftCodeAnalysisVersion) 6.0.0 @@ -12,6 +14,6 @@ $(MicrosoftExtensionsLoggingVersion) 17.2.41 2.9.112 - 2.12.27 + 2.13.21-alpha \ No newline at end of file diff --git a/server/Microsoft.CodeAnalysis.LanguageServer/LanguageServer/ServerCapabilitiesProvider.cs b/server/Microsoft.CodeAnalysis.LanguageServer/LanguageServer/ServerCapabilitiesProvider.cs index 1fdbff346..1acb470f2 100644 --- a/server/Microsoft.CodeAnalysis.LanguageServer/LanguageServer/ServerCapabilitiesProvider.cs +++ b/server/Microsoft.CodeAnalysis.LanguageServer/LanguageServer/ServerCapabilitiesProvider.cs @@ -29,6 +29,9 @@ public ServerCapabilities GetCapabilities(ClientCapabilities clientCapabilities) FoldingRangeProvider = roslynCapabilities.FoldingRangeProvider, DocumentHighlightProvider = roslynCapabilities.DocumentHighlightProvider, SignatureHelpProvider = roslynCapabilities.SignatureHelpProvider, + DocumentFormattingProvider = roslynCapabilities.DocumentFormattingProvider, + DocumentRangeFormattingProvider = roslynCapabilities.DocumentRangeFormattingProvider, + DocumentOnTypeFormattingProvider = roslynCapabilities.DocumentOnTypeFormattingProvider, }; } } diff --git a/server/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj b/server/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj index 1b670cb5b..b7c2ca78c 100644 --- a/server/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj +++ b/server/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj @@ -10,6 +10,8 @@ + +