aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Kuthe2022-10-06 18:50:54 +0000
committerPascal Kuthe2022-10-06 18:50:54 +0000
commit7bc324fde986fab2ded2ad29d7b5244521eddc44 (patch)
tree46e977856d00f3c8fc172269bdf642c8ade059a5
parent114610f7dc5d6395ef5cce9111a363f7c8d879a4 (diff)
make casing consistent with other configuration
-rw-r--r--book/src/themes.md6
-rw-r--r--helix-view/src/theme.rs4
-rw-r--r--runtime/themes/dark_plus.toml4
-rw-r--r--runtime/themes/onedark.toml8
4 files changed, 11 insertions, 11 deletions
diff --git a/book/src/themes.md b/book/src/themes.md
index 450b3364..b386973a 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 90185937..b1c96f94 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 fa6b34ab..afbd1b71 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 5f337a8d..cce0474f 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"] }