on master help sign in
make underline_style a seperate option

Underline styles are mutally exclusive and overwrite each other. Therefore implementing as an modifier lead to incorrect behaviour when the underline style is overwritten. For backwards compatability the "underline" modified is retained (but deprecated). Instead the "underline_style" and "underline_color" optios should be used to style underlines.

commit71ee589bbc723e7a55585ddc2ca43c29ee93fabe authorPascal Kuthe <pascal.kuthe@semimod.de> dateSat 1 Oct 2022, 02:15 (4 years ago) parent79d3d44
9 files changed+167−91
book/src/themes.md+17−6 helix-tui/src/backend/crossterm.rs+23−33 helix-tui/src/buffer.rs+18−9 helix-tui/src/text.rs+8−4 helix-view/src/graphics.rs+72−29 helix-view/src/gutter.rs+2−2 helix-view/src/theme.rs+21−2 runtime/themes/dark_plus.toml+2−2 runtime/themes/onedark.toml+4−4
book/src/themes.md+17−6
@@ -13,10 +13,10 @@ The default theme.toml can be found [here](https://github.com/helix-editor/helix
1313Each line in the theme file is specified as below:
1414
1515```toml
16−key = { fg = "#ffffff", bg = "#000000", underline = "#ff0000", modifiers = ["bold", "italic", "undercurled"] }
16+key = { fg = "#ffffff", bg = "#000000", underline_color = "#ff0000", underline_style = "curl", modifiers = ["bold", "italic"] }
1717```
1818
19−where `key` represents what you want to style, `fg` specifies the foreground color, `bg` the background color, `underline` the underline color (only meaningful if an underline modifier is enabled), and `modifiers` is a list of style modifiers. `bg`, `underline` and `modifiers` can be omitted to defer to the defaults.
19+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.
2020
2121To specify only the foreground color:
2222
@@ -83,16 +83,27 @@ Less common modifiers might not be supported by your terminal emulator.
8383| `dim` |
8484| `italic` |
8585| `underlined` |
86−| `undercurled` |
87−| `underdashed` |
88−| `underdotted` |
89−| `double-underlined` |
9086| `slow_blink` |
9187| `rapid_blink` |
9288| `reversed` |
9389| `hidden` |
9490| `crossed_out` |
9591
92+### Underline Style
93+
94+One of the following values may be used as an `underline_styles`.
95+
96+Some styles might not be supported by your terminal emulator.
97+
98+| Modifier |
99+| --- |
100+| `line` |
101+| `curl` |
102+| `dashed` |
103+| `dot` |
104+| `double-line` |
105+
106+
96107### Scopes
97108
98109The following is a list of scopes available to use for styling.
helix-tui/src/backend/crossterm.rs+23−33
@@ -8,7 +8,7 @@ use crossterm::{
88 },
99 terminal::{self, Clear, ClearType},
1010};
11−use helix_view::graphics::{Color, CursorKind, Modifier, Rect};
11+use helix_view::graphics::{Color, CursorKind, Modifier, Rect, UnderlineStyle};
1212use std::io::{self, Write};
1313
1414fn vte_version() -> Option<usize> {
@@ -80,7 +80,8 @@ where
8080 {
8181 let mut fg = Color::Reset;
8282 let mut bg = Color::Reset;
83− let mut underline = Color::Reset;
83+ let mut underline_color = Color::Reset;
84+ let mut underline_style = UnderlineStyle::Reset;
8485 let mut modifier = Modifier::empty();
8586 let mut last_pos: Option<(u16, u16)> = None;
8687 for (x, y, cell) in content {
@@ -94,7 +95,7 @@ where
9495 from: modifier,
9596 to: cell.modifier,
9697 };
97− diff.queue(&mut self.buffer, self.capabilities)?;
98+ diff.queue(&mut self.buffer)?;
9899 modifier = cell.modifier;
99100 }
100101 if cell.fg != fg {
@@ -107,10 +108,24 @@ where
107108 map_error(queue!(self.buffer, SetBackgroundColor(color)))?;
108109 bg = cell.bg;
109110 }
110− if cell.underline != underline {
111− let color = CColor::from(cell.underline);
111+ if cell.underline_color != underline_color {
112+ let color = CColor::from(cell.underline_color);
112113 map_error(queue!(self.buffer, SetUnderlineColor(color)))?;
113− underline = cell.underline;
114+ underline_color = cell.underline_color;
115+ }
116+
117+ let mut new_underline_style = cell.underline_style;
118+ if !self.capabilities.has_extended_underlines {
119+ match new_underline_style {
120+ UnderlineStyle::Reset => (),
121+ _ => new_underline_style = UnderlineStyle::Line,
122+ }
123+ }
124+
125+ if new_underline_style != underline_style {
126+ let attr = CAttribute::from(cell.underline_style);
127+ map_error(queue!(self.buffer, SetAttribute(attr)))?;
128+ underline_style = new_underline_style;
114129 }
115130
116131 map_error(queue!(self.buffer, Print(&cell.symbol)))?;
@@ -118,6 +133,7 @@ where
118133
119134 map_error(queue!(
120135 self.buffer,
136+ SetUnderlineColor(CColor::Reset),
121137 SetForegroundColor(CColor::Reset),
122138 SetBackgroundColor(CColor::Reset),
123139 SetAttribute(CAttribute::Reset)
@@ -174,7 +190,7 @@ struct ModifierDiff {
174190}
175191
176192impl ModifierDiff {
177− fn queue<W>(&self, mut w: W, caps: Capabilities) -> io::Result<()>
193+ fn queue<W>(&self, mut w: W) -> io::Result<()>
178194 where
179195 W: io::Write,
180196 {
@@ -192,9 +208,6 @@ impl ModifierDiff {
192208 if removed.contains(Modifier::ITALIC) {
193209 map_error(queue!(w, SetAttribute(CAttribute::NoItalic)))?;
194210 }
195− if removed.intersects(Modifier::ANY_UNDERLINE) {
196− map_error(queue!(w, SetAttribute(CAttribute::NoUnderline)))?;
197− }
198211 if removed.contains(Modifier::DIM) {
199212 map_error(queue!(w, SetAttribute(CAttribute::NormalIntensity)))?;
200213 }
@@ -205,14 +218,6 @@ impl ModifierDiff {
205218 map_error(queue!(w, SetAttribute(CAttribute::NoBlink)))?;
206219 }
207220
208− let queue_styled_underline = |styled_underline, w: &mut W| -> io::Result<()> {
209− let underline = match caps.has_extended_underlines {
210− true => styled_underline,
211− false => CAttribute::Underlined,
212− };
213− map_error(queue!(w, SetAttribute(underline)))
214− };
215−
216221 let added = self.to - self.from;
217222 if added.contains(Modifier::REVERSED) {
218223 map_error(queue!(w, SetAttribute(CAttribute::Reverse)))?;
@@ -223,21 +228,6 @@ impl ModifierDiff {
223228 if added.contains(Modifier::ITALIC) {
224229 map_error(queue!(w, SetAttribute(CAttribute::Italic)))?;
225230 }
226− if added.contains(Modifier::UNDERLINED) {
227− map_error(queue!(w, SetAttribute(CAttribute::Underlined)))?;
228− }
229− if added.contains(Modifier::UNDERCURLED) {
230− queue_styled_underline(CAttribute::Undercurled, &mut w)?;
231− }
232− if added.contains(Modifier::UNDERDOTTED) {
233− queue_styled_underline(CAttribute::Underdotted, &mut w)?;
234− }
235− if added.contains(Modifier::UNDERDASHED) {
236− queue_styled_underline(CAttribute::Underdashed, &mut w)?;
237− }
238− if added.contains(Modifier::DOUBLE_UNDERLINED) {
239− queue_styled_underline(CAttribute::DoubleUnderlined, &mut w)?;
240− }
241231 if added.contains(Modifier::DIM) {
242232 map_error(queue!(w, SetAttribute(CAttribute::Dim)))?;
243233 }
helix-tui/src/buffer.rs+18−9
@@ -3,7 +3,7 @@ use helix_core::unicode::width::UnicodeWidthStr;
33use std::cmp::min;
44use unicode_segmentation::UnicodeSegmentation;
55
6−use helix_view::graphics::{Color, Modifier, Rect, Style};
6+use helix_view::graphics::{Color, Modifier, Rect, Style, UnderlineStyle};
77
88/// A buffer cell
99#[derive(Debug, Clone, PartialEq)]
@@ -11,7 +11,8 @@ pub struct Cell {
1111 pub symbol: String,
1212 pub fg: Color,
1313 pub bg: Color,
14− pub underline: Color,
14+ pub underline_color: Color,
15+ pub underline_style: UnderlineStyle,
1516 pub modifier: Modifier,
1617}
1718
@@ -45,9 +46,13 @@ impl Cell {
4546 if let Some(c) = style.bg {
4647 self.bg = c;
4748 }
48− if let Some(c) = style.underline {
49− self.underline = c;
49+ if let Some(c) = style.underline_color {
50+ self.underline_color = c;
5051 }
52+ if let Some(style) = style.underline_style {
53+ self.underline_style = style;
54+ }
55+
5156 self.modifier.insert(style.add_modifier);
5257 self.modifier.remove(style.sub_modifier);
5358 self
@@ -57,7 +62,8 @@ impl Cell {
5762 Style::default()
5863 .fg(self.fg)
5964 .bg(self.bg)
60− .underline(self.underline)
65+ .underline_color(self.underline_color)
66+ .underline_style(self.underline_style)
6167 .add_modifier(self.modifier)
6268 }
6369
@@ -66,7 +72,8 @@ impl Cell {
6672 self.symbol.push(' ');
6773 self.fg = Color::Reset;
6874 self.bg = Color::Reset;
69− self.underline = Color::Reset;
75+ self.underline_color = Color::Reset;
76+ self.underline_style = UnderlineStyle::Reset;
7077 self.modifier = Modifier::empty();
7178 }
7279}
@@ -77,7 +84,8 @@ impl Default for Cell {
7784 symbol: " ".into(),
7885 fg: Color::Reset,
7986 bg: Color::Reset,
80− underline: Color::Reset,
87+ underline_color: Color::Reset,
88+ underline_style: UnderlineStyle::Reset,
8189 modifier: Modifier::empty(),
8290 }
8391 }
@@ -94,7 +102,7 @@ impl Default for Cell {
94102///
95103/// ```
96104/// use helix_tui::buffer::{Buffer, Cell};
97−/// use helix_view::graphics::{Rect, Color, Style, Modifier};
105+/// use helix_view::graphics::{Rect, Color, UnderlineStyle, Style, Modifier};
98106///
99107/// let mut buf = Buffer::empty(Rect{x: 0, y: 0, width: 10, height: 5});
100108/// buf[(0, 2)].set_symbol("x");
@@ -104,7 +112,8 @@ impl Default for Cell {
104112/// symbol: String::from("r"),
105113/// fg: Color::Red,
106114/// bg: Color::White,
107−/// underline: Color::Reset,
115+/// underline_color: Color::Reset,
116+/// underline_style: UnderlineStyle::Reset,
108117/// modifier: Modifier::empty(),
109118/// });
110119/// buf[(5, 0)].set_char('x');
helix-tui/src/text.rs+8−4
@@ -134,7 +134,8 @@ impl<'a> Span<'a> {
134134 /// style: Style {
135135 /// fg: Some(Color::Yellow),
136136 /// bg: Some(Color::Black),
137− /// underline: None,
137+ /// underline_color: None,
138+ /// underline_style: None,
138139 /// add_modifier: Modifier::empty(),
139140 /// sub_modifier: Modifier::empty(),
140141 /// },
@@ -144,7 +145,8 @@ impl<'a> Span<'a> {
144145 /// style: Style {
145146 /// fg: Some(Color::Yellow),
146147 /// bg: Some(Color::Black),
147− /// underline: None,
148+ /// underline_color: None,
149+ /// underline_style: None,
148150 /// add_modifier: Modifier::empty(),
149151 /// sub_modifier: Modifier::empty(),
150152 /// },
@@ -154,7 +156,8 @@ impl<'a> Span<'a> {
154156 /// style: Style {
155157 /// fg: Some(Color::Yellow),
156158 /// bg: Some(Color::Black),
157− /// underline: None,
159+ /// underline_color: None,
160+ /// underline_style: None,
158161 /// add_modifier: Modifier::empty(),
159162 /// sub_modifier: Modifier::empty(),
160163 /// },
@@ -164,7 +167,8 @@ impl<'a> Span<'a> {
164167 /// style: Style {
165168 /// fg: Some(Color::Yellow),
166169 /// bg: Some(Color::Black),
167− /// underline: None,
170+ /// underline_color: None,
171+ /// underline_style: None,
168172 /// add_modifier: Modifier::empty(),
169173 /// sub_modifier: Modifier::empty(),
170174 /// },
helix-view/src/graphics.rs+72−29
@@ -315,6 +315,44 @@ impl From<Color> for crossterm::style::Color {
315315 }
316316}
317317
318+#[derive(Debug, Clone, Copy, PartialEq)]
319+pub enum UnderlineStyle {
320+ Reset,
321+ Line,
322+ Curl,
323+ Dotted,
324+ Dashed,
325+ DoubleLine,
326+}
327+
328+impl FromStr for UnderlineStyle {
329+ type Err = &'static str;
330+
331+ fn from_str(modifier: &str) -> Result<Self, Self::Err> {
332+ match modifier {
333+ "line" => Ok(Self::Line),
334+ "curl" => Ok(Self::Curl),
335+ "dotted" => Ok(Self::Dotted),
336+ "dashed" => Ok(Self::Dashed),
337+ "double_line" => Ok(Self::DoubleLine),
338+ _ => Err("Invalid underline style"),
339+ }
340+ }
341+}
342+
343+impl From<UnderlineStyle> for crossterm::style::Attribute {
344+ fn from(style: UnderlineStyle) -> Self {
345+ match style {
346+ UnderlineStyle::Line => crossterm::style::Attribute::Underlined,
347+ UnderlineStyle::Curl => crossterm::style::Attribute::Undercurled,
348+ UnderlineStyle::Dotted => crossterm::style::Attribute::Underdotted,
349+ UnderlineStyle::Dashed => crossterm::style::Attribute::Underdashed,
350+ UnderlineStyle::DoubleLine => crossterm::style::Attribute::DoubleUnderlined,
351+ UnderlineStyle::Reset => crossterm::style::Attribute::NoUnderline,
352+ }
353+ }
354+}
355+
318356bitflags! {
319357 /// Modifier changes the way a piece of text is displayed.
320358 ///
@@ -332,22 +370,11 @@ bitflags! {
332370 const BOLD = 0b0000_0000_0000_0001;
333371 const DIM = 0b0000_0000_0000_0010;
334372 const ITALIC = 0b0000_0000_0000_0100;
335− const UNDERLINED = 0b0000_0000_0000_1000;
336373 const SLOW_BLINK = 0b0000_0000_0001_0000;
337374 const RAPID_BLINK = 0b0000_0000_0010_0000;
338375 const REVERSED = 0b0000_0000_0100_0000;
339376 const HIDDEN = 0b0000_0000_1000_0000;
340377 const CROSSED_OUT = 0b0000_0001_0000_0000;
341− const UNDERCURLED = 0b0000_0010_0000_0000;
342− const UNDERDOTTED = 0b0000_0100_0000_0000;
343− const UNDERDASHED = 0b0000_1000_0000_0000;
344− const DOUBLE_UNDERLINED = 0b0001_0000_0000_0000;
345−
346− const ANY_UNDERLINE = Self::UNDERLINED.bits
347− | Self::UNDERCURLED.bits
348− | Self::UNDERDOTTED.bits
349− | Self::UNDERDASHED.bits
350− | Self::DOUBLE_UNDERLINED.bits;
351378 }
352379}
353380
@@ -359,16 +386,11 @@ impl FromStr for Modifier {
359386 "bold" => Ok(Self::BOLD),
360387 "dim" => Ok(Self::DIM),
361388 "italic" => Ok(Self::ITALIC),
362− "underlined" => Ok(Self::UNDERLINED),
363389 "slow_blink" => Ok(Self::SLOW_BLINK),
364390 "rapid_blink" => Ok(Self::RAPID_BLINK),
365391 "reversed" => Ok(Self::REVERSED),
366392 "hidden" => Ok(Self::HIDDEN),
367393 "crossed_out" => Ok(Self::CROSSED_OUT),
368− "undercurled" => Ok(Self::UNDERCURLED),
369− "underdotted" => Ok(Self::UNDERDOTTED),
370− "underdashed" => Ok(Self::UNDERDASHED),
371− "double_underlined" => Ok(Self::DOUBLE_UNDERLINED),
372394 _ => Err("Invalid modifier"),
373395 }
374396 }
@@ -389,7 +411,7 @@ impl FromStr for Modifier {
389411/// just S3.
390412///
391413/// ```rust
392−/// # use helix_view::graphics::{Rect, Color, Modifier, Style};
414+/// # use helix_view::graphics::{Rect, Color, UnderlineStyle, Modifier, Style};
393415/// # use helix_tui::buffer::Buffer;
394416/// let styles = [
395417/// Style::default().fg(Color::Blue).add_modifier(Modifier::BOLD | Modifier::ITALIC),
@@ -405,7 +427,8 @@ impl FromStr for Modifier {
405427/// fg: Some(Color::Yellow),
406428/// bg: Some(Color::Red),
407429/// add_modifier: Modifier::BOLD,
408−/// underline: Some(Color::Reset),
430+/// underline_color: Some(Color::Reset),
431+/// underline_style: Some(UnderlineStyle::Reset),
409432/// sub_modifier: Modifier::empty(),
410433/// },
411434/// buffer[(0, 0)].style(),
@@ -416,7 +439,7 @@ impl FromStr for Modifier {
416439/// reset all properties until that point use [`Style::reset`].
417440///
418441/// ```
419−/// # use helix_view::graphics::{Rect, Color, Modifier, Style};
442+/// # use helix_view::graphics::{Rect, Color, UnderlineStyle, Modifier, Style};
420443/// # use helix_tui::buffer::Buffer;
421444/// let styles = [
422445/// Style::default().fg(Color::Blue).add_modifier(Modifier::BOLD | Modifier::ITALIC),
@@ -430,7 +453,8 @@ impl FromStr for Modifier {
430453/// Style {
431454/// fg: Some(Color::Yellow),
432455/// bg: Some(Color::Reset),
433−/// underline: Some(Color::Reset),
456+/// underline_color: Some(Color::Reset),
457+/// underline_style: Some(UnderlineStyle::Reset),
434458/// add_modifier: Modifier::empty(),
435459/// sub_modifier: Modifier::empty(),
436460/// },
@@ -442,7 +466,8 @@ impl FromStr for Modifier {
442466pub struct Style {
443467 pub fg: Option<Color>,
444468 pub bg: Option<Color>,
445− pub underline: Option<Color>,
469+ pub underline_color: Option<Color>,
470+ pub underline_style: Option<UnderlineStyle>,
446471 pub add_modifier: Modifier,
447472 pub sub_modifier: Modifier,
448473}
@@ -452,7 +477,8 @@ impl Default for Style {
452477 Style {
453478 fg: None,
454479 bg: None,
455− underline: None,
480+ underline_color: None,
481+ underline_style: None,
456482 add_modifier: Modifier::empty(),
457483 sub_modifier: Modifier::empty(),
458484 }
@@ -465,7 +491,8 @@ impl Style {
465491 Style {
466492 fg: Some(Color::Reset),
467493 bg: Some(Color::Reset),
468− underline: Some(Color::Reset),
494+ underline_color: None,
495+ underline_style: None,
469496 add_modifier: Modifier::empty(),
470497 sub_modifier: Modifier::all(),
471498 }
@@ -507,12 +534,27 @@ impl Style {
507534 ///
508535 /// ```rust
509536 /// # use helix_view::graphics::{Color, Style};
510− /// let style = Style::default().underline(Color::Blue);
511− /// let diff = Style::default().underline(Color::Red);
512− /// assert_eq!(style.patch(diff), Style::default().underline(Color::Red));
537+ /// let style = Style::default().underline_color(Color::Blue);
538+ /// let diff = Style::default().underline_color(Color::Red);
539+ /// assert_eq!(style.patch(diff), Style::default().underline_color(Color::Red));
540+ /// ```
541+ pub fn underline_color(mut self, color: Color) -> Style {
542+ self.underline_color = Some(color);
543+ self
544+ }
545+
546+ /// Changes the underline style.
547+ ///
548+ /// ## Examples
549+ ///
550+ /// ```rust
551+ /// # use helix_view::graphics::{UnderlineStyle, Style};
552+ /// let style = Style::default().underline_style(UnderlineStyle::Line);
553+ /// let diff = Style::default().underline_style(UnderlineStyle::Curl);
554+ /// assert_eq!(style.patch(diff), Style::default().underline_style(UnderlineStyle::Curl));
513555 /// ```
514− pub fn underline(mut self, color: Color) -> Style {
515− self.underline = Some(color);
556+ pub fn underline_style(mut self, style: UnderlineStyle) -> Style {
557+ self.underline_style = Some(style);
516558 self
517559 }
518560
@@ -572,7 +614,8 @@ impl Style {
572614 pub fn patch(mut self, other: Style) -> Style {
573615 self.fg = other.fg.or(self.fg);
574616 self.bg = other.bg.or(self.bg);
575− self.underline = other.underline.or(self.underline);
617+ self.underline_color = other.underline_color.or(self.underline_color);
618+ self.underline_style = other.underline_style.or(self.underline_style);
576619
577620 self.add_modifier.remove(other.sub_modifier);
578621 self.add_modifier.insert(other.add_modifier);
helix-view/src/gutter.rs+2−2
@@ -1,7 +1,7 @@
11use std::fmt::Write;
22
33use crate::{
4− graphics::{Color, Modifier, Style},
4+ graphics::{Color, Style, UnderlineStyle},
55 Document, Editor, Theme, View,
66};
77
@@ -147,7 +147,7 @@ pub fn breakpoints<'doc>(
147147 .find(|breakpoint| breakpoint.line == line)?;
148148
149149 let mut style = if breakpoint.condition.is_some() && breakpoint.log_message.is_some() {
150− error.add_modifier(Modifier::UNDERLINED)
150+ error.underline_style(UnderlineStyle::Line)
151151 } else if breakpoint.condition.is_some() {
152152 error
153153 } else if breakpoint.log_message.is_some() {
helix-view/src/theme.rs+21−2
@@ -10,6 +10,7 @@ use once_cell::sync::Lazy;
1010use serde::{Deserialize, Deserializer};
1111use toml::Value;
1212
13+use crate::graphics::UnderlineStyle;
1314pub use crate::graphics::{Color, Modifier, Style};
1415
1516pub static DEFAULT_THEME: Lazy<Theme> = Lazy::new(|| {
@@ -263,20 +264,38 @@ impl ThemePalette {
263264 .ok_or(format!("Theme: invalid modifier: {}", value))
264265 }
265266
267+ pub fn parse_underline_style(value: &Value) -> Result<UnderlineStyle, String> {
268+ value
269+ .as_str()
270+ .and_then(|s| s.parse().ok())
271+ .ok_or(format!("Theme: invalid underline_style: {}", value))
272+ }
273+
266274 pub fn parse_style(&self, style: &mut Style, value: Value) -> Result<(), String> {
267275 if let Value::Table(entries) = value {
268276 for (name, value) in entries {
269277 match name.as_str() {
270278 "fg" => *style = style.fg(self.parse_color(value)?),
271279 "bg" => *style = style.bg(self.parse_color(value)?),
272− "underline" => *style = style.underline(self.parse_color(value)?),
280+ "underline_color" => *style = style.underline_color(self.parse_color(value)?),
281+ "underline_style" => {
282+ warn!("found style");
283+ *style = style.underline_style(Self::parse_underline_style(&value)?)
284+ }
273285 "modifiers" => {
274286 let modifiers = value
275287 .as_array()
276288 .ok_or("Theme: modifiers should be an array")?;
277289
278290 for modifier in modifiers {
279− *style = style.add_modifier(Self::parse_modifier(modifier)?);
291+ if modifier
292+ .as_str()
293+ .map_or(false, |modifier| modifier == "underlined")
294+ {
295+ *style = style.underline_style(UnderlineStyle::Line);
296+ } else {
297+ *style = style.add_modifier(Self::parse_modifier(modifier)?);
298+ }
280299 }
281300 }
282301 _ => return Err(format!("Theme: invalid style attribute: {}", name)),
runtime/themes/dark_plus.toml+2−2
@@ -92,8 +92,8 @@
9292"info" = { fg = "light_blue" }
9393"hint" = { fg = "light_gray3" }
9494
95−"diagnostic.error" = {underline = "red", modifiers = ["undercurled"] }
96−"diagnostic" = {underline = "gold", modifiers = ["undercurled"] }
95+"diagnostic.error" = {underline_color = "red", underline_style = "curl"}
96+"diagnostic" = {underline_color = "gold", underline_style = "curl" }
9797
9898[palette]
9999white = "#ffffff"
runtime/themes/onedark.toml+4−4
@@ -39,10 +39,10 @@
3939"diff.delta" = "gold"
4040"diff.minus" = "red"
4141
42−"diagnostic.info" = { underline = "blue", modifiers = ["undercurled"] }
43−"diagnostic.hint" = { underline = "green", modifiers = ["undercurled"] }
44−"diagnostic.warning" = { underline = "yellow", modifiers = ["undercurled"] }
45−"diagnostic.error" = { underline = "red", modifiers = ["undercurled"] }
42+"diagnostic.info" = { underline_color = "blue", underline_style = "curl" }
43+"diagnostic.hint" = { underline_color = "green", underline_style = "curl" }
44+"diagnostic.warning" = { underline_color = "yellow", underline_style = "curl" }
45+"diagnostic.error" = { underline_color = "red", underline_style = "curl" }
4646"info" = { fg = "blue", modifiers = ["bold"] }
4747"hint" = { fg = "green", modifiers = ["bold"] }
4848"warning" = { fg = "yellow", modifiers = ["bold"] }