aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-25 06:26:25 +0000
committerBlaž Hrastnik2021-03-25 06:26:25 +0000
commite3c4edae32f6d70bf20655c7c25b3cdf39f3f281 (patch)
tree5351a5a797de5f213b87f25ae4ba049c8e74d11b /helix-term/src/ui
parenta900159a863c24e4afb1485d8dcff760f722f36b (diff)
Add the machinery to load syntax config from TOML.
It's embedded into the binary at build time for now, but it's progress.
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/markdown.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/helix-term/src/ui/markdown.rs b/helix-term/src/ui/markdown.rs
index c4f6039b..55b90ad4 100644
--- a/helix-term/src/ui/markdown.rs
+++ b/helix-term/src/ui/markdown.rs
@@ -80,6 +80,8 @@ fn parse<'a>(contents: &'a str, theme: Option<&Theme>) -> tui::text::Text<'a> {
let rope = Rope::from(text.as_ref());
let syntax = syntax::LOADER
+ .get()
+ .unwrap()
.language_config_for_scope(&format!("source.{}", language))
.and_then(|config| config.highlight_config(theme.scopes()))
.map(|config| Syntax::new(&rope, config));