aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/main.rs
diff options
context:
space:
mode:
authorMichael Davis2022-02-14 02:08:28 +0000
committerBlaž Hrastnik2022-03-10 08:31:57 +0000
commit00b2d616eb6e35f4223e97beced0226cd146b92b (patch)
tree79cf6f239fd27e3f800b5f8b464e0ab7ccfe8e20 /helix-term/src/main.rs
parent8330f6af202f0a9f681d94c7aec586cf5416e0c9 (diff)
implement build_grammars and fetch_grammars
build_grammars adapts the functionality that previously came from helix-syntax to be used at runtime from the command line flags. fetch_grammars wraps command-line git to perform the same actions previously done in the scripts in #1560.
Diffstat (limited to 'helix-term/src/main.rs')
-rw-r--r--helix-term/src/main.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs
index 4f73c9b4..67f88b4e 100644
--- a/helix-term/src/main.rs
+++ b/helix-term/src/main.rs
@@ -104,6 +104,16 @@ FLAGS:
std::process::exit(0);
}
+ if args.fetch_grammars {
+ helix_term::grammars::fetch_grammars()?;
+ return Ok(0);
+ }
+
+ if args.build_grammars {
+ helix_term::grammars::build_grammars()?;
+ return Ok(0);
+ }
+
let conf_dir = helix_core::config_dir();
if !conf_dir.exists() {
std::fs::create_dir_all(&conf_dir).ok();