From c63d3de88d4728aeeacd9a8d21ed4798d68880a1 Mon Sep 17 00:00:00 2001 From: Szabin Hamrik Date: Wed, 27 Sep 2023 08:44:41 +0200 Subject: [PATCH] Enable color-modes by default --- book/src/configuration.md | 10 +++++----- helix-view/src/editor.rs | 9 ++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/book/src/configuration.md b/book/src/configuration.md index 2bd5b7d7e840..7192f7c9ed48 100644 --- a/book/src/configuration.md +++ b/book/src/configuration.md @@ -60,7 +60,7 @@ Its settings will be merged with the configuration directory `config.toml` and t | `undercurl` | Set to `true` to override automatic detection of terminal undercurl support in the event of a false negative | `false` | | `rulers` | List of column positions at which to display the rulers. Can be overridden by language specific `rulers` in `languages.toml` file | `[]` | | `bufferline` | Renders a line at the top of the editor displaying open buffers. Can be `always`, `never` or `multiple` (only shown if more than one buffer is in use) | `never` | -| `color-modes` | Whether to color the mode indicator with different colors depending on the mode itself | `false` | +| `color-modes` | Whether to color the mode indicator with different colors depending on the mode itself | `true` | | `text-width` | Maximum line length. Used for the `:reflow` command and soft-wrapping if `soft-wrap.wrap-at-text-width` is set | `80` | | `workspace-lsp-roots` | Directories relative to the workspace root that are treated as LSP roots. Should only be set in `.helix/config.toml` | `[]` | | `default-line-ending` | The line ending to use for new documents. Can be `native`, `lf`, `crlf`, `ff`, `cr` or `nel`. `native` uses the platform's native line ending (`crlf` on Windows, otherwise `lf`). | `native` | @@ -92,13 +92,13 @@ The `[editor.statusline]` key takes the following sub-keys: | Key | Description | Default | | --- | --- | --- | -| `left` | A list of elements aligned to the left of the statusline | `["spacer", "mode", "spinner", "file-name", "read-only-indicator", "file-modification-indicator"]` | +| `left` | A list of elements aligned to the left of the statusline | `["mode", "spinner", "file-name", "read-only-indicator", "file-modification-indicator"]` | | `center` | A list of elements aligned to the middle of the statusline | `[]` | | `right` | A list of elements aligned to the right of the statusline | `["diagnostics", "selections", "register", "position", "file-encoding", "spacer"]` | | `separator` | The character used to separate elements in the statusline | `"│"` | -| `mode.normal` | The text shown in the `mode` element for normal mode | `"NOR"` | -| `mode.insert` | The text shown in the `mode` element for insert mode | `"INS"` | -| `mode.select` | The text shown in the `mode` element for select mode | `"SEL"` | +| `mode.normal` | The text shown in the `mode` element for normal mode | `" NOR "` | +| `mode.insert` | The text shown in the `mode` element for insert mode | `" INS "` | +| `mode.select` | The text shown in the `mode` element for select mode | `" SEL "` | The following statusline elements can be configured: diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index f6976327bf5f..1cadf38ca50b 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -424,7 +424,6 @@ impl Default for StatusLineConfig { Self { left: vec![ - E::Spacer, E::Mode, E::Spinner, E::FileName, @@ -457,9 +456,9 @@ pub struct ModeConfig { impl Default for ModeConfig { fn default() -> Self { Self { - normal: String::from("NOR"), - insert: String::from("INS"), - select: String::from("SEL"), + normal: String::from(" NOR "), + insert: String::from(" INS "), + select: String::from(" SEL "), } } } @@ -845,7 +844,7 @@ impl Default for Config { whitespace: WhitespaceConfig::default(), bufferline: BufferLine::default(), indent_guides: IndentGuidesConfig::default(), - color_modes: false, + color_modes: true, soft_wrap: SoftWrap { enable: Some(false), ..SoftWrap::default()