language: Spawn language servers on background threads (#44631)

Closes https://github.com/zed-industries/zed/issues/39056

Leverages a new `await_on_background` API that spawns the future on the
background but blocks the current task, allowing to borrow from the
surrounding scope.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Lukas Wirth
2025-12-11 17:23:27 +00:00
committed by GitHub
parent cda78c12ab
commit 5a6198cc39
8 changed files with 132 additions and 69 deletions
+2 -1
View File
@@ -516,7 +516,8 @@ impl Copilot {
None,
Default::default(),
cx,
)?;
)
.await?;
server
.on_notification::<StatusNotification, _>(|_, _| { /* Silence the notification */ })