diff options
Diffstat (limited to 'helix-lsp/src/lib.rs')
-rw-r--r-- | helix-lsp/src/lib.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs index 6d40cf0a..08676066 100644 --- a/helix-lsp/src/lib.rs +++ b/helix-lsp/src/lib.rs @@ -134,6 +134,7 @@ pub enum Notification { PublishDiagnostics(lsp::PublishDiagnosticsParams), ShowMessage(lsp::ShowMessageParams), LogMessage(lsp::LogMessageParams), + ProgressMessage(lsp::ProgressParams), } impl Notification { @@ -151,17 +152,20 @@ impl Notification { } lsp::notification::ShowMessage::METHOD => { - let params: lsp::ShowMessageParams = - params.parse().expect("Failed to parse ShowMessage params"); + let params: lsp::ShowMessageParams = params.parse().ok()?; Self::ShowMessage(params) } lsp::notification::LogMessage::METHOD => { - let params: lsp::LogMessageParams = - params.parse().expect("Failed to parse ShowMessage params"); + let params: lsp::LogMessageParams = params.parse().ok()?; Self::LogMessage(params) } + lsp::notification::Progress::METHOD => { + let params: lsp::ProgressParams = params.parse().ok()?; + + Self::ProgressMessage(params) + } _ => { log::error!("unhandled LSP notification: {}", method); return None; |