diff options
author | vsrs <[email protected]> | 2020-08-17 12:56:27 +0100 |
---|---|---|
committer | vsrs <[email protected]> | 2020-08-17 12:56:27 +0100 |
commit | 1eed036a6e68aee6128d099e3a8f2c06a90b846b (patch) | |
tree | 0df6d2d6cee256c4dcab1ba1e1a7d3bdafe2d663 /crates | |
parent | b050937c1071e68a4ade69375f1f17b703cafb02 (diff) |
Fix StatusNotification
Diffstat (limited to 'crates')
-rw-r--r-- | crates/rust-analyzer/src/lsp_ext.rs | 7 | ||||
-rw-r--r-- | crates/rust-analyzer/src/reload.rs | 5 |
2 files changed, 10 insertions, 2 deletions
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 { | |||
237 | Invalid, | 237 | Invalid, |
238 | } | 238 | } |
239 | 239 | ||
240 | #[derive(Deserialize, Serialize)] | ||
241 | pub struct StatusParams { | ||
242 | pub status: Status, | ||
243 | } | ||
244 | |||
240 | impl Notification for StatusNotification { | 245 | impl Notification for StatusNotification { |
241 | type Params = Status; | 246 | type Params = StatusParams; |
242 | const METHOD: &'static str = "rust-analyzer/status"; | 247 | const METHOD: &'static str = "rust-analyzer/status"; |
243 | } | 248 | } |
244 | 249 | ||
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::{ | |||
14 | lsp_ext, | 14 | lsp_ext, |
15 | main_loop::Task, | 15 | main_loop::Task, |
16 | }; | 16 | }; |
17 | use lsp_ext::StatusParams; | ||
17 | 18 | ||
18 | impl GlobalState { | 19 | impl GlobalState { |
19 | pub(crate) fn update_configuration(&mut self, config: Config) { | 20 | pub(crate) fn update_configuration(&mut self, config: Config) { |
@@ -86,7 +87,9 @@ impl GlobalState { | |||
86 | Status::Invalid => lsp_ext::Status::Invalid, | 87 | Status::Invalid => lsp_ext::Status::Invalid, |
87 | Status::NeedsReload => lsp_ext::Status::NeedsReload, | 88 | Status::NeedsReload => lsp_ext::Status::NeedsReload, |
88 | }; | 89 | }; |
89 | self.send_notification::<lsp_ext::StatusNotification>(lsp_status); | 90 | self.send_notification::<lsp_ext::StatusNotification>(StatusParams { |
91 | status: lsp_status, | ||
92 | }); | ||
90 | } | 93 | } |
91 | } | 94 | } |
92 | pub(crate) fn fetch_workspaces(&mut self) { | 95 | pub(crate) fn fetch_workspaces(&mut self) { |