More robust status notifications
This commit is contained in:
@@ -241,26 +241,26 @@ pub struct SsrParams {
|
||||
pub selections: Vec<lsp_types::Range>,
|
||||
}
|
||||
|
||||
pub enum StatusNotification {}
|
||||
pub enum ServerStatusNotification {}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
impl Notification for ServerStatusNotification {
|
||||
type Params = ServerStatusParams;
|
||||
const METHOD: &'static str = "experimental/serverStatus";
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, PartialEq, Eq, Clone)]
|
||||
pub struct ServerStatusParams {
|
||||
pub health: Health,
|
||||
pub quiescent: bool,
|
||||
pub message: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub enum Status {
|
||||
Loading,
|
||||
ReadyPartial,
|
||||
Ready,
|
||||
NeedsReload,
|
||||
Invalid,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub struct StatusParams {
|
||||
pub status: Status,
|
||||
}
|
||||
|
||||
impl Notification for StatusNotification {
|
||||
type Params = StatusParams;
|
||||
const METHOD: &'static str = "rust-analyzer/status";
|
||||
pub enum Health {
|
||||
Ok,
|
||||
Warning,
|
||||
Error,
|
||||
}
|
||||
|
||||
pub enum CodeActionRequest {}
|
||||
|
||||
Reference in New Issue
Block a user