Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix line number settings migration (#41351)
Finn Eversbd0bcdb0edb9
diff --git a/crates/migrator/src/migrations/m_2025_10_21/settings.rs b/crates/migrator/src/migrations/m_2025_10_21/settings.rsindex 6fe8814fb43..1f78f933274 100644--- a/crates/migrator/src/migrations/m_2025_10_21/settings.rs+++ b/crates/migrator/src/migrations/m_2025_10_21/settings.rs@@ -9,6 +9,7 @@ pub fn make_relative_line_numbers_an_enum(value: &mut Value) -> Result<()> {*relative_line_numbers = match relative_line_numbers {Value::Bool(true) => Value::String("enabled".to_string()),Value::Bool(false) => Value::String("disabled".to_string()),+ Value::String(s) if s == "enabled" || s == "disabled" || s == "wrapped" => return Ok(()),_ => anyhow::bail!("Expected relative_line_numbers to be a boolean"),};Ok(())diff --git a/docs/src/configuring-zed.md b/docs/src/configuring-zed.mdindex 218b25f569d..3aabc05b7ad 100644--- a/docs/src/configuring-zed.md+++ b/docs/src/configuring-zed.md@@ -2996,11 +2996,33 @@ List of `string` glob patterns- Description: Whether to show relative line numbers in the gutter- Setting: `relative_line_numbers`-- Default: `false`+- Default: `"disabled"`**Options**-`boolean` values+1. Show relative line numbers in the gutter whilst counting wrapped lines as one line:++```json [settings]+{+ "relative_line_numbers": "enabled"+}+```++2. Show relative line numbers in the gutter, including wrapped lines in the counting:++```json [settings]+{+ "relative_line_numbers": "wrapped"+}+```++2. Do not use relative line numbers:++```json [settings]+{+ "relative_line_numbers": "disabled"+}+```## Remove Trailing Whitespace On Save