@@ -282,6 +282,8 @@ impl MethodCall {
282282pub enum Notification {
283283 // we inject this notification to signal the LSP is ready
284284 Initialized,
285+ // and this notification to signal that the LSP exited
286+ Exit,
285287 PublishDiagnostics(lsp::PublishDiagnosticsParams),
286288 ShowMessage(lsp::ShowMessageParams),
287289 LogMessage(lsp::LogMessageParams),
@@ -294,6 +296,7 @@ impl Notification {
294296
295297 let notification = match method {
296298 lsp::notification::Initialized::METHOD => Self::Initialized,
299+ lsp::notification::Exit::METHOD => Self::Exit,
297300 lsp::notification::PublishDiagnostics::METHOD => {
298301 let params: lsp::PublishDiagnosticsParams = params.parse()?;
299302 Self::PublishDiagnostics(params)
@@ -350,6 +353,10 @@ impl Registry {
350353 .map(|(_, client)| client.as_ref())
351354 }
352355
356+ pub fn remove_by_id(&mut self, id: usize) {
357+ self.inner.retain(|_, (client_id, _)| client_id != &id)
358+ }
359+
353360 pub fn restart(
354361 &mut self,
355362 language_config: &LanguageConfiguration,