diff --git a/crates/diagnostics/src/diagnostics.rs b/crates/diagnostics/src/diagnostics.rs index adfc82105c..905cc39347 100644 --- a/crates/diagnostics/src/diagnostics.rs +++ b/crates/diagnostics/src/diagnostics.rs @@ -602,10 +602,14 @@ fn path_header_renderer(buffer: ModelHandle, build_settings: BuildSettin } else { "untitled".to_string() }; - Label::new(file_path, settings.style.text.clone()) + let mut text_style = settings.style.text.clone(); + let style = settings.style.diagnostic_path_header; + text_style.color = style.text; + Label::new(file_path, text_style) .aligned() .left() .contained() + .with_style(style.header) .with_padding_left(cx.line_number_x) .expanded() .boxed() diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 55affde95d..eb412f3dcb 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -3691,6 +3691,7 @@ impl EditorSettings { selection: Default::default(), guest_selections: Default::default(), syntax: Default::default(), + diagnostic_path_header: Default::default(), error_diagnostic: Default::default(), invalid_error_diagnostic: Default::default(), warning_diagnostic: Default::default(), diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rs index dcd378dcc5..3bd78f2634 100644 --- a/crates/theme/src/theme.rs +++ b/crates/theme/src/theme.rs @@ -251,6 +251,7 @@ pub struct EditorStyle { pub line_number_active: Color, pub guest_selections: Vec, pub syntax: Arc, + pub diagnostic_path_header: DiagnosticStyle, pub error_diagnostic: DiagnosticStyle, pub invalid_error_diagnostic: DiagnosticStyle, pub warning_diagnostic: DiagnosticStyle, @@ -316,6 +317,7 @@ impl InputEditorStyle { line_number_active: Default::default(), guest_selections: Default::default(), syntax: Default::default(), + diagnostic_path_header: Default::default(), error_diagnostic: Default::default(), invalid_error_diagnostic: Default::default(), warning_diagnostic: Default::default(), diff --git a/crates/zed/assets/themes/_base.toml b/crates/zed/assets/themes/_base.toml index e85638c225..95dc7eee60 100644 --- a/crates/zed/assets/themes/_base.toml +++ b/crates/zed/assets/themes/_base.toml @@ -256,21 +256,26 @@ invalid_warning_diagnostic = { text = "$text.3.color" } invalid_information_diagnostic = { text = "$text.3.color" } invalid_hint_diagnostic = { text = "$text.3.color" } +[editor.diagnostic_path_header] +text = "$text.0.color" +header.background = "#ffffff08" +header.border = { width = 1, top = true, color = "$border.0" } + [editor.error_diagnostic] text = "$status.bad" -header = { padding = { left = 10 }, background = "#ffffff08" } +header.border = { width = 1, top = true, color = "$border.0" } [editor.warning_diagnostic] text = "$status.warn" -header = { padding = { left = 10 }, background = "#ffffff08" } +header.border = { width = 1, top = true, color = "$border.0" } [editor.information_diagnostic] text = "$status.info" -header = { padding = { left = 10 }, background = "#ffffff08" } +border = { width = 1, top = true, color = "$border.0" } [editor.hint_diagnostic] text = "$status.info" -header = { padding = { left = 10 }, background = "#ffffff08" } +border = { width = 1, top = true, color = "$border.0" } [project_diagnostics] background = "$surface.1"