From 7bc324fde986fab2ded2ad29d7b5244521eddc44 Mon Sep 17 00:00:00 2001 From: Pascal Kuthe Date: Thu, 6 Oct 2022 20:50:54 +0200 Subject: [PATCH] make casing consistent with other configuration --- book/src/themes.md | 6 +++--- helix-view/src/theme.rs | 4 ++-- runtime/themes/dark_plus.toml | 4 ++-- runtime/themes/onedark.toml | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/book/src/themes.md b/book/src/themes.md index 450b33649..b386973a7 100644 --- a/book/src/themes.md +++ b/book/src/themes.md @@ -13,7 +13,7 @@ The default theme.toml can be found [here](https://github.com/helix-editor/helix Each line in the theme file is specified as below: ```toml -key = { fg = "#ffffff", bg = "#000000", underline_color = "#ff0000", underline_style = "curl", modifiers = ["bold", "italic"] } +key = { fg = "#ffffff", bg = "#000000", underline-color = "#ff0000", underline-style = "curl", modifiers = ["bold", "italic"] } ``` where `key` represents what you want to style, `fg` specifies the foreground color, `bg` the background color, `underline_style` the underline style, `underline_color` the underline color (only meaningful if an underline style is enabled), and `modifiers` is a list of style modifiers. `bg`, `underline` and `modifiers` can be omitted to defer to the defaults. @@ -91,7 +91,7 @@ Less common modifiers might not be supported by your terminal emulator. ### Underline Style -One of the following values may be used as an `underline_styles`. +One of the following values may be used as an `underline-style`. Some styles might not be supported by your terminal emulator. @@ -101,7 +101,7 @@ Some styles might not be supported by your terminal emulator. | `curl` | | `dashed` | | `dot` | -| `double-line` | +| `double_line` | ### Scopes diff --git a/helix-view/src/theme.rs b/helix-view/src/theme.rs index 90185937c..b1c96f94f 100644 --- a/helix-view/src/theme.rs +++ b/helix-view/src/theme.rs @@ -277,8 +277,8 @@ impl ThemePalette { match name.as_str() { "fg" => *style = style.fg(self.parse_color(value)?), "bg" => *style = style.bg(self.parse_color(value)?), - "underline_color" => *style = style.underline_color(self.parse_color(value)?), - "underline_style" => { + "underline-color" => *style = style.underline_color(self.parse_color(value)?), + "underline-style" => { warn!("found style"); *style = style.underline_style(Self::parse_underline_style(&value)?) } diff --git a/runtime/themes/dark_plus.toml b/runtime/themes/dark_plus.toml index fa6b34ab4..afbd1b714 100644 --- a/runtime/themes/dark_plus.toml +++ b/runtime/themes/dark_plus.toml @@ -92,8 +92,8 @@ "info" = { fg = "light_blue" } "hint" = { fg = "light_gray3" } -"diagnostic.error" = {underline_color = "red", underline_style = "curl"} -"diagnostic" = {underline_color = "gold", underline_style = "curl" } +"diagnostic.error" = {underline-color = "red", underline-style = "curl"} +"diagnostic" = {underline-color = "gold", underline-style = "curl" } [palette] white = "#ffffff" diff --git a/runtime/themes/onedark.toml b/runtime/themes/onedark.toml index 5f337a8d5..cce0474f4 100644 --- a/runtime/themes/onedark.toml +++ b/runtime/themes/onedark.toml @@ -39,10 +39,10 @@ "diff.delta" = "gold" "diff.minus" = "red" -"diagnostic.info" = { underline_color = "blue", underline_style = "curl" } -"diagnostic.hint" = { underline_color = "green", underline_style = "curl" } -"diagnostic.warning" = { underline_color = "yellow", underline_style = "curl" } -"diagnostic.error" = { underline_color = "red", underline_style = "curl" } +"diagnostic.info" = { underline-color = "blue", underline-style = "curl" } +"diagnostic.hint" = { underline-color = "green", underline-style = "curl" } +"diagnostic.warning" = { underline-color = "yellow", underline-style = "curl" } +"diagnostic.error" = { underline-color = "red", underline-style = "curl" } "info" = { fg = "blue", modifiers = ["bold"] } "hint" = { fg = "green", modifiers = ["bold"] } "warning" = { fg = "yellow", modifiers = ["bold"] }