Add language server control tool into the status bar (#32490)

Release Notes:

- Added the language server control tool into the status bar

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
This commit is contained in:
Kirill Bulatov 2025-06-25 19:57:28 +03:00 committed by GitHub
parent 91c9281cea
commit c0acd8e8b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 1992 additions and 312 deletions

View file

@ -49,6 +49,10 @@ pub struct ProjectSettings {
#[serde(default)]
pub lsp: HashMap<LanguageServerName, LspSettings>,
/// Common language server settings.
#[serde(default)]
pub global_lsp_settings: GlobalLspSettings,
/// Configuration for Debugger-related features
#[serde(default)]
pub dap: HashMap<DebugAdapterName, DapSettings>,
@ -110,6 +114,16 @@ pub enum ContextServerSettings {
},
}
/// Common language server settings.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
pub struct GlobalLspSettings {
/// Whether to show the LSP servers button in the status bar.
///
/// Default: `true`
#[serde(default = "default_true")]
pub button: bool,
}
impl ContextServerSettings {
pub fn default_extension() -> Self {
Self::Extension {
@ -271,6 +285,14 @@ impl Default for InlineDiagnosticsSettings {
}
}
impl Default for GlobalLspSettings {
fn default() -> Self {
Self {
button: default_true(),
}
}
}
#[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema)]
pub struct CargoDiagnosticsSettings {
/// When enabled, Zed disables rust-analyzer's check on save and starts to query