Capture language server stderr during startup/init and log if failure
This commit is contained in:
parent
1936ba5e30
commit
170ebd8221
8 changed files with 68 additions and 38 deletions
|
@ -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" }
|
||||
|
|
|
@ -16,6 +16,7 @@ use language::{
|
|||
};
|
||||
use lsp::{LanguageServer, LanguageServerBinary, LanguageServerId};
|
||||
use node_runtime::NodeRuntime;
|
||||
use parking_lot::Mutex;
|
||||
use request::StatusNotification;
|
||||
use settings::SettingsStore;
|
||||
use smol::{fs, io::BufReader, stream::StreamExt};
|
||||
|
@ -387,8 +388,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, _>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue