From 9498f02f2c45453f3cb764ab8e9c5b85f4b44bf6 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 16 Mar 2023 15:01:31 +0100 Subject: [PATCH] Retrieve workspace configuration before initializing language server --- crates/project/src/project.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs index 20422a8b59..5b2fd412e8 100644 --- a/crates/project/src/project.rs +++ b/crates/project/src/project.rs @@ -1958,6 +1958,8 @@ impl Project { self.language_servers.insert( server_id, LanguageServerState::Starting(cx.spawn_weak(|this, mut cx| async move { + let workspace_config = + cx.update(|cx| languages.workspace_configuration(cx)).await; let language_server = language_server?.await.log_err()?; let language_server = language_server .initialize(initialization_options) @@ -2088,8 +2090,6 @@ impl Project { }) .detach(); - let workspace_config = - cx.update(|cx| languages.workspace_configuration(cx)).await; language_server .notify::( lsp::DidChangeConfigurationParams {