diff options
author | Blaž Hrastnik | 2021-04-15 08:34:38 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-04-15 08:34:38 +0000 |
commit | 3b90317060d92de803befbbfc5ffc2929e85a9c0 (patch) | |
tree | b678cf99d6ea2b60eda14af986c86b4586a98d55 /helix-lsp/src | |
parent | 305a059f583ba0de3217506d4f89fc462de98cc0 (diff) |
Add window/showMessage / logMessage stubs so gopls fully starts.
Diffstat (limited to 'helix-lsp/src')
-rw-r--r-- | helix-lsp/src/lib.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs index dd925c14..6dcc6605 100644 --- a/helix-lsp/src/lib.rs +++ b/helix-lsp/src/lib.rs @@ -123,6 +123,8 @@ pub mod util { #[derive(Debug, PartialEq, Clone)] pub enum Notification { PublishDiagnostics(lsp::PublishDiagnosticsParams), + ShowMessage(lsp::ShowMessageParams), + LogMessage(lsp::LogMessageParams), } impl Notification { @@ -138,6 +140,19 @@ impl Notification { // TODO: need to loop over diagnostics and distinguish them by URI Notification::PublishDiagnostics(params) } + + lsp::notification::ShowMessage::METHOD => { + let params: lsp::ShowMessageParams = + params.parse().expect("Failed to parse ShowMessage params"); + + Notification::ShowMessage(params) + } + lsp::notification::LogMessage::METHOD => { + let params: lsp::LogMessageParams = + params.parse().expect("Failed to parse ShowMessage params"); + + Notification::LogMessage(params) + } _ => unimplemented!("unhandled notification: {}", method), } } |