aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-lsp/src')
-rw-r--r--helix-lsp/src/client.rs4
-rw-r--r--helix-lsp/src/lib.rs12
2 files changed, 12 insertions, 4 deletions
diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs
index c2ea11b8..fde9b018 100644
--- a/helix-lsp/src/client.rs
+++ b/helix-lsp/src/client.rs
@@ -228,6 +228,10 @@ impl Client {
}),
..Default::default()
}),
+ window: Some(lsp::WindowClientCapabilities {
+ work_done_progress: Some(true),
+ ..Default::default()
+ }),
..Default::default()
},
trace: None,
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;