Skip to content

Commit

Permalink
make casing consistent with other configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalkuthe committed Oct 6, 2022
1 parent 114610f commit 7bc324f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions book/src/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.

Expand All @@ -101,7 +101,7 @@ Some styles might not be supported by your terminal emulator.
| `curl` |
| `dashed` |
| `dot` |
| `double-line` |
| `double_line` |


### Scopes
Expand Down
4 changes: 2 additions & 2 deletions helix-view/src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?)
}
Expand Down
4 changes: 2 additions & 2 deletions runtime/themes/dark_plus.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions runtime/themes/onedark.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down

0 comments on commit 7bc324f

Please sign in to comment.