diff --git a/Directory.Packages.props b/Directory.Packages.props index f657780..3e2ba3e 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -14,30 +14,30 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - - - - + + + + + - + @@ -55,7 +55,7 @@ - - + + - \ No newline at end of file + diff --git a/src/SharpIDE.Application/Features/Analysis/RoslynAnalysis.cs b/src/SharpIDE.Application/Features/Analysis/RoslynAnalysis.cs index efed9ad..2e9295c 100644 --- a/src/SharpIDE.Application/Features/Analysis/RoslynAnalysis.cs +++ b/src/SharpIDE.Application/Features/Analysis/RoslynAnalysis.cs @@ -12,10 +12,12 @@ using Microsoft.CodeAnalysis.CodeRefactorings; using Microsoft.CodeAnalysis.Completion; using Microsoft.CodeAnalysis.Host.Mef; using Microsoft.CodeAnalysis.MSBuild; +using Microsoft.CodeAnalysis.Razor.Remote; using Microsoft.CodeAnalysis.Razor.SemanticTokens; using Microsoft.CodeAnalysis.Remote.Razor.ProjectSystem; using Microsoft.CodeAnalysis.Remote.Razor.SemanticTokens; using Microsoft.CodeAnalysis.Text; +using Roslyn.LanguageServer.Protocol; using SharpIDE.Application.Features.Analysis.FixLoaders; using SharpIDE.Application.Features.Analysis.Razor; using SharpIDE.Application.Features.Build; @@ -23,6 +25,7 @@ using SharpIDE.Application.Features.SolutionDiscovery; using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence; using SharpIDE.RazorAccess; using CodeAction = Microsoft.CodeAnalysis.CodeActions.CodeAction; +using CompletionItem = Microsoft.CodeAnalysis.Completion.CompletionItem; using CompletionList = Microsoft.CodeAnalysis.Completion.CompletionList; using Diagnostic = Microsoft.CodeAnalysis.Diagnostic; using DiagnosticSeverity = Microsoft.CodeAnalysis.DiagnosticSeverity; @@ -78,8 +81,13 @@ public class RoslynAnalysis var snapshotManager = container.GetExports().FirstOrDefault(); _snapshotManager = snapshotManager; - _semanticTokensLegendService = container.GetExports().FirstOrDefault(); - _semanticTokensLegendService!.SetLegend(TokenTypeProvider.ConstructTokenTypes(false), TokenTypeProvider.ConstructTokenModifiers()); + _semanticTokensLegendService = (RemoteSemanticTokensLegendService)container.GetExports().FirstOrDefault()!; + _semanticTokensLegendService!.OnLspInitialized(new RemoteClientLSPInitializationOptions + { + ClientCapabilities = new VSInternalClientCapabilities(), + TokenModifiers = TokenTypeProvider.ConstructTokenModifiers(), + TokenTypes = TokenTypeProvider.ConstructTokenTypes(false) + }); _msBuildProjectLoader = new CustomMsBuildProjectLoader(_workspace); } diff --git a/src/SharpIDE.Godot/SharpIDE.Godot.csproj b/src/SharpIDE.Godot/SharpIDE.Godot.csproj index 53919ca..c86f6d9 100644 --- a/src/SharpIDE.Godot/SharpIDE.Godot.csproj +++ b/src/SharpIDE.Godot/SharpIDE.Godot.csproj @@ -13,14 +13,14 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + \ No newline at end of file