diff --git a/crates/copilot/src/copilot.rs b/crates/copilot/src/copilot.rs index b51f6925513156ab1382c6c127f0c910a687b69e..4e6520906074c1384a4e500d89be43659c162718 100644 --- a/crates/copilot/src/copilot.rs +++ b/crates/copilot/src/copilot.rs @@ -516,8 +516,7 @@ impl Copilot { None, Default::default(), cx, - ) - .await?; + )?; server .on_notification::(|_, _| { /* Silence the notification */ }) diff --git a/crates/lsp/src/lsp.rs b/crates/lsp/src/lsp.rs index ea3b0b09d6ac1f03d4b51534ad7eaa5ec9424221..9ff6e245c49d771c162ca55fa98bbd7ca37d7bd0 100644 --- a/crates/lsp/src/lsp.rs +++ b/crates/lsp/src/lsp.rs @@ -314,7 +314,7 @@ pub struct AdapterServerCapabilities { impl LanguageServer { /// Starts a language server process. - pub async fn new( + pub fn new( stderr_capture: Arc>>, server_id: LanguageServerId, server_name: LanguageServerName, @@ -338,23 +338,19 @@ impl LanguageServer { working_dir, &binary.arguments ); - let mut server = cx - .background_executor() - .await_on_background(async { - let mut command = util::command::new_smol_command(&binary.path); - command - .current_dir(working_dir) - .args(&binary.arguments) - .envs(binary.env.clone().unwrap_or_default()) - .stdin(Stdio::piped()) - .stdout(Stdio::piped()) - .stderr(Stdio::piped()) - .kill_on_drop(true); - command - .spawn() - .with_context(|| format!("failed to spawn command {command:?}",)) - }) - .await?; + let mut command = util::command::new_smol_command(&binary.path); + command + .current_dir(working_dir) + .args(&binary.arguments) + .envs(binary.env.clone().unwrap_or_default()) + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .kill_on_drop(true); + + let mut server = command + .spawn() + .with_context(|| format!("failed to spawn command {command:?}",))?; let stdin = server.stdin.take().unwrap(); let stdout = server.stdout.take().unwrap(); diff --git a/crates/prettier/src/prettier.rs b/crates/prettier/src/prettier.rs index 247d0a2656fd826604b174ca6ea98108202e3274..bc4ce609a1fd39e4303c5fd048a0c8605b3a3ddc 100644 --- a/crates/prettier/src/prettier.rs +++ b/crates/prettier/src/prettier.rs @@ -320,7 +320,6 @@ impl Prettier { Default::default(), &mut cx, ) - .await .context("prettier server creation")?; let server = cx diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rs index 9514ea03eff5e5ee2135ebd5e406c473f3fdea8d..a8c639fe5930bf8c71d8bca5f2455364826c3514 100644 --- a/crates/project/src/lsp_store.rs +++ b/crates/project/src/lsp_store.rs @@ -425,7 +425,6 @@ impl LocalLspStore { Some(pending_workspace_folders), cx, ) - .await } });