Skip to content

Commit

Permalink
Enable color-modes by default
Browse files Browse the repository at this point in the history
  • Loading branch information
hamrik committed Dec 19, 2023
1 parent cfea237 commit c63d3de
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
10 changes: 5 additions & 5 deletions book/src/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down Expand Up @@ -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:

Expand Down
9 changes: 4 additions & 5 deletions helix-view/src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ impl Default for StatusLineConfig {

Self {
left: vec![
E::Spacer,
E::Mode,
E::Spinner,
E::FileName,
Expand Down Expand Up @@ -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 "),
}
}
}
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit c63d3de

Please sign in to comment.