1// Copyright © SixtyFPS GmbH <info@slint.dev>
2// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
3
4//! Extensions to the LSP
5
6use lsp_types::notification::Notification;
7use serde::{Deserialize, Serialize};
8
9/// Taken from rust-analyzer
10pub enum ServerStatusNotification {}
11
12impl Notification for ServerStatusNotification {
13 type Params = ServerStatusParams;
14 const METHOD: &'static str = "experimental/serverStatus";
15}
16
17#[derive(Deserialize, Serialize, PartialEq, Eq, Clone)]
18pub struct ServerStatusParams {
19 pub health: Health,
20 pub quiescent: bool,
21 pub message: Option<String>,
22}
23
24#[derive(Serialize, Debug, Deserialize, Clone, Copy, PartialEq, Eq)]
25#[serde(rename_all = "camelCase")]
26pub enum Health {
27 Ok,
28 Warning,
29 Error,
30}
31