Capture language server stderr during startup/init and log if failure

zed2 electric boogaloo
This commit is contained in:
Julia 2023-10-26 13:50:24 +02:00
parent 06c22206af
commit 8a0fb668f7
8 changed files with 54 additions and 27 deletions

View file

@ -36,6 +36,7 @@ serde.workspace = true
serde_derive.workspace = true
smol.workspace = true
futures.workspace = true
parking_lot.workspace = true
[dev-dependencies]
clock = { path = "../clock" }

View file

@ -17,6 +17,7 @@ use language2::{
};
use lsp2::{LanguageServer, LanguageServerBinary, LanguageServerId};
use node_runtime::NodeRuntime;
use parking_lot::Mutex;
use request::StatusNotification;
use settings2::SettingsStore;
use smol::{fs, io::BufReader, stream::StreamExt};
@ -394,8 +395,15 @@ impl Copilot {
path: node_path,
arguments,
};
let server =
LanguageServer::new(new_server_id, binary, Path::new("/"), None, cx.clone())?;
let server = LanguageServer::new(
Arc::new(Mutex::new(None)),
new_server_id,
binary,
Path::new("/"),
None,
cx.clone(),
)?;
server
.on_notification::<StatusNotification, _>(