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:
parent
91c9281cea
commit
c0acd8e8b1
32 changed files with 1992 additions and 312 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue