From 0f596071007d040bf5e6415c70a65e8050ed1261 Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Fri, 14 Jun 2024 09:48:25 -0400 Subject: [PATCH] docs: wrap_guides (#12992) - Add 'wrap_guides' to website config docs. - Add the word 'ruler' to improve searchability. --- assets/settings/default.json | 8 ++++---- crates/language/src/language_settings.rs | 10 +++++----- docs/src/configuring-zed.md | 10 ++++++++++ 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/assets/settings/default.json b/assets/settings/default.json index d8821c66cf..48ceeed2aa 100644 --- a/assets/settings/default.json +++ b/assets/settings/default.json @@ -119,10 +119,10 @@ // The debounce delay before re-querying the language server for completion // documentation when not included in original completion list. "completion_documentation_secondary_query_debounce": 300, - // Whether to show wrap guides in the editor. Setting this to true will - // show a guide at the 'preferred_line_length' value if 'soft_wrap' is set to - // 'preferred_line_length', and will show any additional guides as specified - // by the 'wrap_guides' setting. + // Whether to show wrap guides (vertical rulers) in the editor. + // Setting this to true will show a guide at the 'preferred_line_length' value + // if softwrap is set to 'preferred_line_length', and will show any + // additional guides as specified by the 'wrap_guides' setting. "show_wrap_guides": true, // Character counts at which to show wrap guides in the editor. "wrap_guides": [], diff --git a/crates/language/src/language_settings.rs b/crates/language/src/language_settings.rs index 4e5b10edb8..0d90f38cfb 100644 --- a/crates/language/src/language_settings.rs +++ b/crates/language/src/language_settings.rs @@ -71,12 +71,12 @@ pub struct LanguageSettings { /// The column at which to soft-wrap lines, for buffers where soft-wrap /// is enabled. pub preferred_line_length: u32, - /// Whether to show wrap guides in the editor. Setting this to true will - /// show a guide at the 'preferred_line_length' value if softwrap is set to - /// 'preferred_line_length', and will show any additional guides as specified - /// by the 'wrap_guides' setting. + // Whether to show wrap guides (vertical rulers) in the editor. + // Setting this to true will show a guide at the 'preferred_line_length' value + // if softwrap is set to 'preferred_line_length', and will show any + // additional guides as specified by the 'wrap_guides' setting. pub show_wrap_guides: bool, - /// Character counts at which to show wrap guides in the editor. + /// Character counts at which to show wrap guides (vertical rulers) in the editor. pub wrap_guides: Vec, /// Indent guide related settings. pub indent_guides: IndentGuideSettings, diff --git a/docs/src/configuring-zed.md b/docs/src/configuring-zed.md index 652cdc1998..880fe58901 100644 --- a/docs/src/configuring-zed.md +++ b/docs/src/configuring-zed.md @@ -1117,6 +1117,16 @@ These values take in the same options as the root-level settings with the same n 2. `preferred_line_length` 3. `none` +## Wrap Guides (Vertical Rulers) + +- Description: Where to display vertical rulers as wrap-guides. Disable by setting `show_wrap_guides` to `false`. +- Setting: `wrap_guides` +- Default: [] + +**Options** + +List of `integer` column numbers + ## Tab Size - Description: The number of spaces to use for each tab character.