From 3b90317060d92de803befbbfc5ffc2929e85a9c0 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Thu, 15 Apr 2021 17:34:38 +0900 Subject: Add window/showMessage / logMessage stubs so gopls fully starts. --- helix-lsp/src/lib.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'helix-lsp/src') 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), } } -- cgit v1.2.3-70-g09d2