diff --git a/src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs b/src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs index ecc285097..1cd5065c5 100644 --- a/src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs +++ b/src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs @@ -74,11 +74,6 @@ public LanguageServer(HostDetails hostDetails, ChannelBase serverChannel) protected override void Initialize() { - // Initialize the extension service - // TODO: This should be made awaited once Initialize is async! - this.editorSession.ExtensionService.Initialize( - this.editorOperations).Wait(); - // Register all supported message types this.SetRequestHandler(InitializeRequest.Type, this.HandleInitializeRequest); @@ -107,6 +102,11 @@ protected override void Initialize() this.SetRequestHandler(InvokeExtensionCommandRequest.Type, this.HandleInvokeExtensionCommandRequest); this.SetRequestHandler(DebugAdapterMessages.EvaluateRequest.Type, this.HandleEvaluateRequest); + + // Initialize the extension service + // TODO: This should be made awaited once Initialize is async! + this.editorSession.ExtensionService.Initialize( + this.editorOperations).Wait(); } protected override async Task Shutdown()