aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-lsp/src/lib.rs')
-rw-r--r--helix-lsp/src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs
index feeedc96..5de76c6c 100644
--- a/helix-lsp/src/lib.rs
+++ b/helix-lsp/src/lib.rs
@@ -282,6 +282,8 @@ impl MethodCall {
pub enum Notification {
// we inject this notification to signal the LSP is ready
Initialized,
+ // and this notification to signal that the LSP exited
+ Exit,
PublishDiagnostics(lsp::PublishDiagnosticsParams),
ShowMessage(lsp::ShowMessageParams),
LogMessage(lsp::LogMessageParams),
@@ -294,6 +296,7 @@ impl Notification {
let notification = match method {
lsp::notification::Initialized::METHOD => Self::Initialized,
+ lsp::notification::Exit::METHOD => Self::Exit,
lsp::notification::PublishDiagnostics::METHOD => {
let params: lsp::PublishDiagnosticsParams = params.parse()?;
Self::PublishDiagnostics(params)
@@ -350,6 +353,10 @@ impl Registry {
.map(|(_, client)| client.as_ref())
}
+ pub fn remove_by_id(&mut self, id: usize) {
+ self.inner.retain(|_, (client_id, _)| client_id != &id)
+ }
+
pub fn restart(
&mut self,
language_config: &LanguageConfiguration,