From 8b689815f4b641a600c1b39ca0511912201b3659 Mon Sep 17 00:00:00 2001 From: LazyTanuki <43273245+lazytanuki@users.noreply.github.com> Date: Wed, 8 Jun 2022 10:55:28 +0200 Subject: [PATCH] fix: updated doc test --- helix-tui/src/widgets/table.rs | 4 +++- runtime/themes/autumn.toml | 1 + runtime/themes/bogster.toml | 1 + runtime/themes/dracula.toml | 1 + runtime/themes/gruvbox.toml | 1 + runtime/themes/ingrid.toml | 1 + runtime/themes/monokai.toml | 1 + runtime/themes/nord.toml | 1 + runtime/themes/onedark.toml | 1 + runtime/themes/rose_pine.toml | 1 + runtime/themes/snazzy.toml | 1 + theme.toml | 1 + 12 files changed, 14 insertions(+), 1 deletion(-) diff --git a/helix-tui/src/widgets/table.rs b/helix-tui/src/widgets/table.rs index 5ce1c67645423..b578d6c4b47d2 100644 --- a/helix-tui/src/widgets/table.rs +++ b/helix-tui/src/widgets/table.rs @@ -175,7 +175,9 @@ impl<'a> Row<'a> { /// // ...and they can be separated by a fixed spacing. /// .column_spacing(1) /// // If you wish to highlight a row in any specific way when it is selected... -/// .highlight_style(Style::default().add_modifier(Modifier::BOLD)) +/// .selected_style(Style::default().add_modifier(Modifier::BOLD)) +/// // If you wish to highlight a row in any specific way when it is preselected... +/// .highlighted_style(Style::default().add_modifier(Modifier::BOLD)) /// // ...and potentially show a symbol in front of the selection. /// .highlight_symbol(">>"); /// ``` diff --git a/runtime/themes/autumn.toml b/runtime/themes/autumn.toml index 68e41f5af0797..9ea420ba7831f 100644 --- a/runtime/themes/autumn.toml +++ b/runtime/themes/autumn.toml @@ -10,6 +10,7 @@ "ui.background" = { bg = "my_gray0" } "ui.menu" = { fg = "my_white", bg = "my_gray2" } "ui.menu.selected" = { fg = "my_gray2", bg = "my_gray5" } +"ui.menu.highlighted" = { fg = "my_red", bg = "my_gray2" } "ui.linenr" = { fg = "my_gray4", bg = "my_gray2" } "ui.popup" = { bg = "my_gray2" } "ui.window" = { fg = "my_gray4", bg = "my_gray2" } diff --git a/runtime/themes/bogster.toml b/runtime/themes/bogster.toml index df3a7f3153062..1d2615560adda 100644 --- a/runtime/themes/bogster.toml +++ b/runtime/themes/bogster.toml @@ -62,6 +62,7 @@ "ui.menu" = { fg = "#e5ded6bg", bg = "#232d38" } "ui.menu.selected" = { bg = "#313f4e" } +"ui.menu.highlighted" = { fg = "#dcb659" } "warning" = "#dc7759" "error" = "#dc597f" diff --git a/runtime/themes/dracula.toml b/runtime/themes/dracula.toml index e32c3117b1db9..4696d1ae5cd84 100644 --- a/runtime/themes/dracula.toml +++ b/runtime/themes/dracula.toml @@ -28,6 +28,7 @@ "ui.linenr.selected" = { fg = "foreground" } "ui.menu" = { fg = "foreground", bg = "background_dark" } "ui.menu.selected" = { fg = "cyan", bg = "background_dark" } +"ui.menu.highlighted" = { fg = "cyan" } "ui.popup" = { fg = "foreground", bg = "background_dark" } "ui.selection" = { bg = "secondary_highlight" } "ui.selection.primary" = { bg = "primary_highlight" } diff --git a/runtime/themes/gruvbox.toml b/runtime/themes/gruvbox.toml index 6de35244a5def..9332569dad20e 100644 --- a/runtime/themes/gruvbox.toml +++ b/runtime/themes/gruvbox.toml @@ -53,6 +53,7 @@ "ui.cursor.match" = { bg = "bg2" } "ui.menu" = { fg = "fg1", bg = "bg2" } "ui.menu.selected" = { fg = "bg2", bg = "blue1", modifiers = ["bold"] } +"ui.menu.highlighted" = { fg = "green1" } "ui.virtual" = "bg2" "diagnostic" = { modifiers = ["underlined"] } diff --git a/runtime/themes/ingrid.toml b/runtime/themes/ingrid.toml index 79b749b14d93c..5f3105f518008 100644 --- a/runtime/themes/ingrid.toml +++ b/runtime/themes/ingrid.toml @@ -59,6 +59,7 @@ # "ui.cursor.match" # TODO might want to override this because dimmed is not widely supported "ui.menu" = { fg = "#7B91B3", bg = "#F3EAE9" } "ui.menu.selected" = { fg = "#D74E50", bg = "#F3EAE9" } +"ui.menu.highlighted" = { fg = "#D74E50" } "warning" = "#D4A520" "error" = "#D74E50" diff --git a/runtime/themes/monokai.toml b/runtime/themes/monokai.toml index 3fb1fadc30f47..6f230b28d932a 100644 --- a/runtime/themes/monokai.toml +++ b/runtime/themes/monokai.toml @@ -61,6 +61,7 @@ "ui.help" = { bg = "widget" } "ui.menu" = { bg = "widget" } "ui.menu.selected" = { bg = "#414339" } +"ui.menu.highlighted" = { fg = "#F92672" } "ui.cursor" = { fg = "cursor", modifiers = ["reversed"] } "ui.cursor.primary" = { fg = "cursor", modifiers = ["reversed"] } diff --git a/runtime/themes/nord.toml b/runtime/themes/nord.toml index a61c17157f333..975e7b4ce5492 100644 --- a/runtime/themes/nord.toml +++ b/runtime/themes/nord.toml @@ -4,6 +4,7 @@ "ui.text.focus" = { fg = "nord8", modifiers= ["bold"] } "ui.menu" = { fg = "nord6", bg = "#232d38" } "ui.menu.selected" = { fg = "nord8", bg = "nord2" } +"ui.menu.highlighted" = { fg = "nord8" } "ui.virtual" = "gray" "info" = "nord8" diff --git a/runtime/themes/onedark.toml b/runtime/themes/onedark.toml index 280f6914da48b..dc344d7411ba5 100644 --- a/runtime/themes/onedark.toml +++ b/runtime/themes/onedark.toml @@ -71,6 +71,7 @@ diagnostic = { modifiers = ["underlined"] } "ui.window" = { bg = "gray" } "ui.menu" = { fg = "white", bg = "gray" } "ui.menu.selected" = { fg = "black", bg = "blue" } +"ui.menu.highlighted" = { fg = "red" } [palette] diff --git a/runtime/themes/rose_pine.toml b/runtime/themes/rose_pine.toml index f05758801ae5a..42581116c3f3a 100644 --- a/runtime/themes/rose_pine.toml +++ b/runtime/themes/rose_pine.toml @@ -4,6 +4,7 @@ "ui.background" = { bg = "base" } "ui.menu" = { fg = "text", bg = "overlay" } "ui.menu.selected" = { fg = "iris", bg = "surface" } +"ui.menu.highlighted" = { fg = "iris"} "ui.linenr" = {fg = "subtle" } "ui.liner.selected" = "highlightOverlay" "ui.selection" = { bg = "highlight" } diff --git a/runtime/themes/snazzy.toml b/runtime/themes/snazzy.toml index c0547f33b6143..2415d22fef6fa 100644 --- a/runtime/themes/snazzy.toml +++ b/runtime/themes/snazzy.toml @@ -30,6 +30,7 @@ "ui.linenr.selected" = { fg = "foreground" } "ui.menu" = { fg = "foreground", bg = "background_dark" } "ui.menu.selected" = { fg = "cyan", bg = "background_dark" } +"ui.menu.highlighted" = { fg = "cyan" } "ui.popup" = { fg = "foreground", bg = "background_dark" } "ui.selection" = { bg = "secondary_highlight" } "ui.selection.primary" = { bg = "primary_highlight" } diff --git a/theme.toml b/theme.toml index 7a518b2fe4063..a04b90c355d26 100644 --- a/theme.toml +++ b/theme.toml @@ -67,6 +67,7 @@ label = "honey" "ui.menu" = { fg = "lavender", bg = "revolver" } "ui.menu.selected" = { fg = "revolver", bg = "white" } +"ui.menu.highlighted" = { fg = "almond"} diagnostic = { modifiers = ["underlined"] } # "diagnostic.hint" = { fg = "revolver", bg = "lilac" }