From fbef8c2b3b6b029cc7da2b8d1fb04c877d46d2e5 Mon Sep 17 00:00:00 2001 From: Bennet Bo Fenner Date: Thu, 2 Jan 2025 12:27:17 -0500 Subject: [PATCH] docs: Update scrollbar > diagnostics setting section (#22574) This updates the docs after the setting was changed in #22364 Release Notes: - N/A --- assets/settings/default.json | 2 +- crates/editor/src/editor_settings.rs | 9 ++---- docs/src/configuring-zed.md | 46 +++++++++++++++++++++++++--- 3 files changed, 45 insertions(+), 12 deletions(-) diff --git a/assets/settings/default.json b/assets/settings/default.json index ff118d721ec94..141e0abd444b3 100644 --- a/assets/settings/default.json +++ b/assets/settings/default.json @@ -256,7 +256,7 @@ "search_results": true, // Whether to show selected symbol occurrences in the scrollbar. "selected_symbol": true, - // Which diagnostic indicator levels to show in the scrollbar: + // Which diagnostic indicators to show in the scrollbar: // - "none" or false: do not show diagnostics // - "error": show only errors // - "warning": show only errors and warnings diff --git a/crates/editor/src/editor_settings.rs b/crates/editor/src/editor_settings.rs index 2f98b0626e9ea..52b69833ec71d 100644 --- a/crates/editor/src/editor_settings.rs +++ b/crates/editor/src/editor_settings.rs @@ -150,7 +150,7 @@ pub struct ScrollbarAxes { pub vertical: bool, } -/// Which diagnostic indicator levels to show in the scrollbar. +/// Which diagnostic indicators to show in the scrollbar. /// /// Default: all #[derive(Copy, Clone, Debug, Serialize, JsonSchema, PartialEq, Eq)] @@ -415,12 +415,7 @@ pub struct ScrollbarContent { /// /// Default: true pub selected_symbol: Option, - /// Which diagnostic indicator levels to show in the scrollbar: - /// - "none" or false: do not show diagnostics - /// - "error": show only errors - /// - "warning": show only errors and warnings - /// - "information": show only errors, warnings, and information - /// - "all" or true: show all diagnostics + /// Which diagnostic indicators to show in the scrollbar: /// /// Default: all pub diagnostics: Option, diff --git a/docs/src/configuring-zed.md b/docs/src/configuring-zed.md index fb729e96b055d..25f0823fbd9ad 100644 --- a/docs/src/configuring-zed.md +++ b/docs/src/configuring-zed.md @@ -534,7 +534,7 @@ List of `string` values "git_diff": true, "search_results": true, "selected_symbol": true, - "diagnostics": true, + "diagnostics": "all", "axes": { "horizontal": true, "vertical": true, @@ -624,13 +624,51 @@ List of `string` values ### Diagnostics -- Description: Whether to show diagnostic indicators in the scrollbar. +- Description: Which diagnostic indicators to show in the scrollbar. - Setting: `diagnostics` -- Default: `true` +- Default: `all` **Options** -`boolean` values +1. Show all diagnostics: + +```json +{ + "diagnostics": "all" +} +``` + +2. Do not show any diagnostics: + +```json +{ + "diagnostics": "none" +} +``` + +3. Show only errors: + +```json +{ + "diagnostics": "error" +} +``` + +4. Show only errors and warnings: + +```json +{ + "diagnostics": "warning" +} +``` + +5. Show only errors, warnings, and information: + +```json +{ + "diagnostics": "information" +} +``` ### Axes