mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Fix StatusNotification
This commit is contained in:
parent
b050937c10
commit
1eed036a6e
5 changed files with 22 additions and 5 deletions
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
|
@ -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_ext::StatusNotification>(lsp_status);
|
||||
self.send_notification::<lsp_ext::StatusNotification>(StatusParams {
|
||||
status: lsp_status,
|
||||
});
|
||||
}
|
||||
}
|
||||
pub(crate) fn fetch_workspaces(&mut self) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue