aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-11-18 09:40:27 +0000
committerBlaž Hrastnik2021-11-18 09:40:27 +0000
commit9dcccb45bbee30011a44fcabaae94a5f6589ff7b (patch)
tree707453e089ae49308e26dee3b5a86a5e44f6f87e /helix-term
parent27ceeb83bb055c90670cb9a4d8fdab7d5c742b2f (diff)
ui: Stop hardcoding markdown doc colors
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/ui/markdown.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/helix-term/src/ui/markdown.rs b/helix-term/src/ui/markdown.rs
index 4144ed3c..72d84271 100644
--- a/helix-term/src/ui/markdown.rs
+++ b/helix-term/src/ui/markdown.rs
@@ -61,9 +61,15 @@ fn parse<'a>(
})
}
- let text_style = Style::default().fg(Color::Rgb(164, 160, 232)); // lavender
- let code_style = Style::default().fg(Color::Rgb(255, 255, 255)); // white
- let heading_style = Style::default().fg(Color::Rgb(219, 191, 239)); // lilac
+ let text_style = theme.map(|theme| theme.get("ui.text")).unwrap_or_default();
+
+ // TODO: use better scopes for these, `markup.raw.block`, `markup.heading`
+ let code_style = theme
+ .map(|theme| theme.get("ui.text.focus"))
+ .unwrap_or_default(); // white
+ let heading_style = theme
+ .map(|theme| theme.get("ui.linenr.selected"))
+ .unwrap_or_default(); // lilac
for event in parser {
match event {