summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNNB2021-12-02 12:33:31 +0000
committerBlaž Hrastnik2021-12-13 15:48:45 +0000
commitd9727868dd7a496d33a321faeacfcd02d8c1c06e (patch)
tree1f1017a54b0ab049e3b10569ef38aa9c0d417ecc
parent3080be82687548e06a05e517e09a36721b769f03 (diff)
change to .unwrap_or_default() and fix ui.window and ui.statusline
-rw-r--r--base16_terminal.toml10
-rw-r--r--helix-view/src/theme.rs2
-rw-r--r--runtime/themes/base16_default_dark.toml4
-rw-r--r--runtime/themes/base16_default_light.toml4
-rw-r--r--runtime/themes/base16_tty.toml17
5 files changed, 12 insertions, 25 deletions
diff --git a/base16_terminal.toml b/base16_terminal.toml
index e613526f..a76cfd7e 100644
--- a/base16_terminal.toml
+++ b/base16_terminal.toml
@@ -1,7 +1,7 @@
# Author: NNB <nnbnh@protonmail.com>
"ui.menu" = "black"
-"ui.menu.selected" = { fg = "white", bg = "black" }
+"ui.menu.selected" = { modifiers = ["reversed"] }
"ui.linenr" = { fg = "light-gray", bg = "black" }
"ui.popup" = { bg = "black" }
"ui.window" = { bg = "black" }
@@ -9,12 +9,10 @@
"ui.selection" = { fg = "gray", modifiers = ["reversed"] }
"comment" = { fg = "light-gray", modifiers = ["italic"] }
"ui.statusline" = { fg = "white", bg = "black" }
+"ui.statusline.inactive" = { fg = "gray", bg = "black" }
"ui.help" = { fg = "white", bg = "black" }
"ui.cursor" = { fg = "light-gray", modifiers = ["reversed"] }
-"ui.cursor.primary" = { fg = "white", modifiers = ["reversed"] } #FIXME
-"ui.text" = "white" #FIXME
-"operator" = "white" #FIXME
-"ui.text.focus" = "white" #FIXME
+"ui.cursor.primary" = { modifiers = ["reversed"] }
"variable" = "light-red"
"constant.numeric" = "yellow"
"constant" = "yellow"
@@ -30,8 +28,6 @@
"keyword" = "light-magenta"
"label" = "light-magenta"
"namespace" = "light-magenta"
-"ui.popup" = { bg = "black" }
-"ui.window" = { bg = "base00" }
"ui.help" = { fg = "white", bg = "black" }
"info" = "light-gray"
diff --git a/helix-view/src/theme.rs b/helix-view/src/theme.rs
index a5dc0609..6ca021a9 100644
--- a/helix-view/src/theme.rs
+++ b/helix-view/src/theme.rs
@@ -151,7 +151,7 @@ impl Theme {
pub fn get(&self, scope: &str) -> Style {
self.try_get(scope)
- .unwrap_or_else(|| Style::default().fg(Color::Rgb(0, 0, 255)))
+ .unwrap_or_default()
}
pub fn try_get(&self, scope: &str) -> Option<Style> {
diff --git a/runtime/themes/base16_default_dark.toml b/runtime/themes/base16_default_dark.toml
index 3472162b..0b12bdbc 100644
--- a/runtime/themes/base16_default_dark.toml
+++ b/runtime/themes/base16_default_dark.toml
@@ -2,7 +2,7 @@
"ui.background" = { bg = "base00" }
"ui.menu" = "base01"
-"ui.menu.selected" = { fg = "base04", bg = "base01" }
+"ui.menu.selected" = { fg = "base01", bg = "base04" }
"ui.linenr" = { fg = "base03", bg = "base01" }
"ui.popup" = { bg = "base01" }
"ui.window" = { bg = "base01" }
@@ -31,8 +31,6 @@
"keyword" = "base0E"
"label" = "base0E"
"namespace" = "base0E"
-"ui.popup" = { bg = "base01" }
-"ui.window" = { bg = "base00" }
"ui.help" = { fg = "base06", bg = "base01" }
"info" = "base03"
diff --git a/runtime/themes/base16_default_light.toml b/runtime/themes/base16_default_light.toml
index d864fd5f..144144d1 100644
--- a/runtime/themes/base16_default_light.toml
+++ b/runtime/themes/base16_default_light.toml
@@ -2,7 +2,7 @@
"ui.background" = { bg = "base00" }
"ui.menu" = "base01"
-"ui.menu.selected" = { fg = "base04", bg = "base01" }
+"ui.menu.selected" = { fg = "base01", bg = "base04" }
"ui.linenr" = { fg = "base03", bg = "base01" }
"ui.popup" = { bg = "base01" }
"ui.window" = { bg = "base01" }
@@ -31,8 +31,6 @@
"keyword" = "base0E"
"label" = "base0E"
"namespace" = "base0E"
-"ui.popup" = { bg = "base01" }
-"ui.window" = { bg = "base00" }
"ui.help" = { fg = "base06", bg = "base01" }
"info" = "base03"
diff --git a/runtime/themes/base16_tty.toml b/runtime/themes/base16_tty.toml
index 480bcd9c..e1d1647b 100644
--- a/runtime/themes/base16_tty.toml
+++ b/runtime/themes/base16_tty.toml
@@ -1,20 +1,17 @@
# Author: NNB <nnbnh@protonmail.com>
"ui.menu" = "black"
-"ui.menu.selected" = { fg = "white", bg = "black" }
+"ui.menu.selected" = { modifiers = ["reversed"] }
"ui.linenr" = { fg = "gray", bg = "black" }
-"ui.popup" = { bg = "black" }
-"ui.window" = { bg = "black" }
+"ui.popup" = { modifiers = ["reversed"] }
"ui.linenr.selected" = { fg = "white", bg = "black", modifiers = ["bold"] }
"ui.selection" = { fg = "black", bg = "blue" }
"ui.selection.primary" = { fg = "white", bg = "blue" }
"comment" = { fg = "gray" }
-"ui.statusline" = { fg = "white", bg = "black" }
-"ui.help" = { fg = "white", bg = "black" }
-"ui.cursor" = { fg = "white", modifiers = ["reversed"] } #FIXME
-"ui.text" = "white" #FIXME
-"operator" = "white" #FIXME
-"ui.text.focus" = "white" #FIXME
+"ui.statusline" = { fg = "black", bg = "white" }
+"ui.statusline.inactive" = { fg = "gray", bg = "white" }
+"ui.help" = { modifiers = ["reversed"] }
+"ui.cursor" = { modifiers = ["reversed"] }
"variable" = "red"
"constant.numeric" = "yellow"
"constant" = "yellow"
@@ -30,8 +27,6 @@
"keyword" = "magenta"
"label" = "magenta"
"namespace" = "magenta"
-"ui.popup" = { bg = "black" }
-"ui.window" = { bg = "base00" }
"ui.help" = { fg = "white", bg = "black" }
"info" = "gray"