diff options
author | Wojciech Kępka | 2021-06-11 03:42:16 +0000 |
---|---|---|
committer | GitHub | 2021-06-11 03:42:16 +0000 |
commit | 098806ce2ab78155e102067c170fec42cd552e4a (patch) | |
tree | 49af62b4e3c2a086a4017c6d1569ceac75743f66 /helix-lsp | |
parent | c0d32707d03d71434c290e18d6db18b3b2de3875 (diff) |
lsp: Display LSP progress messages (#216)
Diffstat (limited to 'helix-lsp')
-rw-r--r-- | helix-lsp/src/client.rs | 4 | ||||
-rw-r--r-- | helix-lsp/src/lib.rs | 12 |
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; |