aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/main.rs
diff options
context:
space:
mode:
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?;