Show error and warning indicators in tabs (#21383)
Closes #21179 Release Notes: - Add setting to display error and warning indicators in tabs. <img width="454" alt="demo_with_icons" src="https://github.com/user-attachments/assets/6002b4d4-dca8-4e2a-842d-1df3e281fcd2"> <img width="454" alt="demo_without_icons" src="https://github.com/user-attachments/assets/df4b67bd-1a6c-4354-847e-d7fea95c1b7e">
This commit is contained in:
parent
92dea066dd
commit
6ebd6c2893
5 changed files with 131 additions and 38 deletions
|
@ -42,6 +42,7 @@ pub struct ItemSettings {
|
|||
pub close_position: ClosePosition,
|
||||
pub activate_on_close: ActivateOnClose,
|
||||
pub file_icons: bool,
|
||||
pub show_diagnostics: ShowDiagnostics,
|
||||
pub always_show_close_button: bool,
|
||||
}
|
||||
|
||||
|
@ -60,6 +61,15 @@ pub enum ClosePosition {
|
|||
Right,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Default, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum ShowDiagnostics {
|
||||
Off,
|
||||
Errors,
|
||||
#[default]
|
||||
All,
|
||||
}
|
||||
|
||||
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum ActivateOnClose {
|
||||
|
@ -86,6 +96,11 @@ pub struct ItemSettingsContent {
|
|||
///
|
||||
/// Default: history
|
||||
pub activate_on_close: Option<ActivateOnClose>,
|
||||
/// Which files containing diagnostic errors/warnings to mark in the tabs.
|
||||
/// This setting can take the following three values:
|
||||
///
|
||||
/// Default: all
|
||||
show_diagnostics: Option<ShowDiagnostics>,
|
||||
/// Whether to always show the close button on tabs.
|
||||
///
|
||||
/// Default: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue