@@ -23,7 +23,7 @@ use crossterm::{
2323
2424use tui::layout::Rect;
2525
26−use futures_util::stream::FuturesUnordered;
26+use futures_util::{future, stream::FuturesUnordered};
2727
2828type BoxFuture<T> = Pin<Box<dyn Future<Output = T> + Send>>;
2929pub type LspCallback =
@@ -406,6 +406,17 @@ impl Application {
406406
407407 self.event_loop().await;
408408
409+ tokio::time::timeout(
410+ Duration::from_millis(500),
411+ future::join_all(
412+ self.editor
413+ .language_servers
414+ .iter_clients()
415+ .map(|client| client.force_shutdown()),
416+ ),
417+ )
418+ .await;
419+
409420 // reset cursor shape
410421 write!(stdout, "\x1B[2 q");
411422