aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/main.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-10-20 14:11:22 +0000
committerGitHub2022-10-20 14:11:22 +0000
commit78c0cdc519a2c76842441103b1ed716bb7c0a4e1 (patch)
treea7a551c4fd458a6dec3ccb94bc31055f7c8c9077 /helix-term/src/main.rs
parent8c9bb23650ba3c0c0bc7b25a359f997e130feb25 (diff)
parent756253b43f5ec1d8cc6fce9e6ebcf3f9fee5bc5a (diff)
Merge pull request #2267 from dead10ck/fix-write-fail
Write path fixes
Diffstat (limited to 'helix-term/src/main.rs')
-rw-r--r--helix-term/src/main.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs
index 726bf9e3..96b695c6 100644
--- a/helix-term/src/main.rs
+++ b/helix-term/src/main.rs
@@ -139,8 +139,18 @@ FLAGS:
Err(err) => return Err(Error::new(err)),
};
+ let syn_loader_conf = helix_core::config::user_syntax_loader().unwrap_or_else(|err| {
+ eprintln!("Bad language config: {}", err);
+ eprintln!("Press <ENTER> to continue with default language config");
+ use std::io::Read;
+ // This waits for an enter press.
+ let _ = std::io::stdin().read(&mut []);
+ helix_core::config::default_syntax_loader()
+ });
+
// TODO: use the thread local executor to spawn the application task separately from the work pool
- let mut app = Application::new(args, config).context("unable to create new application")?;
+ let mut app = Application::new(args, config, syn_loader_conf)
+ .context("unable to create new application")?;
let exit_code = app.run(&mut EventStream::new()).await?;