summaryrefslogtreecommitdiff
path: root/helix-lsp
diff options
context:
space:
mode:
Diffstat (limited to 'helix-lsp')
-rw-r--r--helix-lsp/src/lib.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs
index 341d4a54..ca9d17ac 100644
--- a/helix-lsp/src/lib.rs
+++ b/helix-lsp/src/lib.rs
@@ -476,6 +476,16 @@ impl Registry {
}
}
+ pub fn stop(&mut self, language_config: &LanguageConfiguration) {
+ let scope = language_config.scope.clone();
+
+ if let Some((_, client)) = self.inner.remove(&scope) {
+ tokio::spawn(async move {
+ let _ = client.force_shutdown().await;
+ });
+ }
+ }
+
pub fn get(
&mut self,
language_config: &LanguageConfiguration,