From 1eed036a6e68aee6128d099e3a8f2c06a90b846b Mon Sep 17 00:00:00 2001 From: vsrs Date: Mon, 17 Aug 2020 14:56:27 +0300 Subject: Fix StatusNotification --- crates/rust-analyzer/src/lsp_ext.rs | 7 ++++++- crates/rust-analyzer/src/reload.rs | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'crates') diff --git a/crates/rust-analyzer/src/lsp_ext.rs b/crates/rust-analyzer/src/lsp_ext.rs index 3976b6529..e1a28b1b4 100644 --- a/crates/rust-analyzer/src/lsp_ext.rs +++ b/crates/rust-analyzer/src/lsp_ext.rs @@ -237,8 +237,13 @@ pub enum Status { Invalid, } +#[derive(Deserialize, Serialize)] +pub struct StatusParams { + pub status: Status, +} + impl Notification for StatusNotification { - type Params = Status; + type Params = StatusParams; const METHOD: &'static str = "rust-analyzer/status"; } diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index 1907f2f13..b70efcb4d 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs @@ -14,6 +14,7 @@ use crate::{ lsp_ext, main_loop::Task, }; +use lsp_ext::StatusParams; impl GlobalState { pub(crate) fn update_configuration(&mut self, config: Config) { @@ -86,7 +87,9 @@ impl GlobalState { Status::Invalid => lsp_ext::Status::Invalid, Status::NeedsReload => lsp_ext::Status::NeedsReload, }; - self.send_notification::(lsp_status); + self.send_notification::(StatusParams { + status: lsp_status, + }); } } pub(crate) fn fetch_workspaces(&mut self) { -- cgit v1.2.3