mirror of
https://github.com/kbwo/testing-language-server.git
synced 2025-08-02 06:42:15 +00:00
parent
daa8db434c
commit
73a179f90b
2 changed files with 16 additions and 0 deletions
|
@ -85,6 +85,13 @@ fn main_loop(server: &mut TestingLS) -> Result<(), LSError> {
|
|||
let id = value["id"].as_i64().unwrap();
|
||||
server.initialize(id, initialize_params)?;
|
||||
}
|
||||
"shutdown" => {
|
||||
let id = value["id"].as_i64().unwrap();
|
||||
server.shutdown(id)?;
|
||||
}
|
||||
"exit" => {
|
||||
std::process::exit(0);
|
||||
}
|
||||
"workspace/diagnostic" => {
|
||||
server.diagnose_workspace()?;
|
||||
}
|
||||
|
|
|
@ -452,6 +452,15 @@ impl TestingLS {
|
|||
}))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn shutdown(&self, id: i64) -> Result<(), LSError> {
|
||||
send_stdout(&json!({
|
||||
"jsonrpc": "2.0",
|
||||
"id": id,
|
||||
"method": json!(null),
|
||||
}))?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue