diff options
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) { |