diff options
author | Michael Davis | 2022-02-14 02:08:28 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-03-10 08:31:57 +0000 |
commit | 00b2d616eb6e35f4223e97beced0226cd146b92b (patch) | |
tree | 79cf6f239fd27e3f800b5f8b464e0ab7ccfe8e20 /helix-term/src/main.rs | |
parent | 8330f6af202f0a9f681d94c7aec586cf5416e0c9 (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.rs | 10 |
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(); |