Show error and warning indicators in project panel items (#18182)
Closes #5016 Release Notes: - Add setting to display error and warning indicators in project panel items. https://github.com/user-attachments/assets/8f8031e6-ca47-42bf-a7eb-718eb1067f36 --------- Co-authored-by: Thorsten Ball <mrnugget@gmail.com> Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
This commit is contained in:
parent
a7eb3a9b9f
commit
0a9c78a58d
12 changed files with 262 additions and 30 deletions
|
@ -31,6 +31,7 @@ pub struct ProjectPanelSettings {
|
|||
pub auto_reveal_entries: bool,
|
||||
pub auto_fold_dirs: bool,
|
||||
pub scrollbar: ScrollbarSettings,
|
||||
pub show_diagnostics: ShowDiagnostics,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
|
||||
|
@ -60,6 +61,21 @@ pub struct ScrollbarSettingsContent {
|
|||
pub show: Option<Option<ShowScrollbar>>,
|
||||
}
|
||||
|
||||
/// Whether to indicate diagnostic errors and/or warnings in project panel items.
|
||||
///
|
||||
/// Default: all
|
||||
#[derive(Copy, Clone, Debug, Default, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum ShowDiagnostics {
|
||||
/// Never mark the diagnostic errors/warnings in the project panel.
|
||||
Off,
|
||||
/// Mark files containing only diagnostic errors in the project panel.
|
||||
Errors,
|
||||
#[default]
|
||||
/// Mark files containing diagnostic errors or warnings in the project panel.
|
||||
All,
|
||||
}
|
||||
|
||||
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
|
||||
pub struct ProjectPanelSettingsContent {
|
||||
/// Whether to show the project panel button in the status bar.
|
||||
|
@ -103,6 +119,10 @@ pub struct ProjectPanelSettingsContent {
|
|||
pub auto_fold_dirs: Option<bool>,
|
||||
/// Scrollbar-related settings
|
||||
pub scrollbar: Option<ScrollbarSettingsContent>,
|
||||
/// Which files containing diagnostic errors/warnings to mark in the project panel.
|
||||
///
|
||||
/// Default: all
|
||||
pub show_diagnostics: Option<ShowDiagnostics>,
|
||||
/// Settings related to indent guides in the project panel.
|
||||
pub indent_guides: Option<IndentGuidesSettingsContent>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue