Delay quit until language servers are gracefully shut down

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2021-11-01 11:57:21 -07:00
parent b8994c2a89
commit 1aee7bdb1d
5 changed files with 98 additions and 39 deletions

View file

@ -124,7 +124,7 @@ impl Language {
} else {
Path::new(&config.binary).to_path_buf()
};
lsp::LanguageServer::new(&binary_path, root_path, cx.background()).map(Some)
lsp::LanguageServer::new(&binary_path, root_path, cx.background().clone()).map(Some)
} else {
Ok(None)
}

View file

@ -409,7 +409,7 @@ fn test_autoindent_adjusts_lines_when_only_text_changes(cx: &mut MutableAppConte
#[gpui::test]
async fn test_diagnostics(mut cx: gpui::TestAppContext) {
let (language_server, mut fake) = lsp::LanguageServer::fake(&cx.background()).await;
let (language_server, mut fake) = lsp::LanguageServer::fake(cx.background()).await;
let text = "
fn a() { A }