aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorMichael Davis2022-02-14 02:08:11 +0000
committerBlaž Hrastnik2022-03-10 08:31:57 +0000
commit8330f6af202f0a9f681d94c7aec586cf5416e0c9 (patch)
tree7cc1fdce2d1963d7f8172078b43d83b6b6f6c198 /helix-term/src
parentc1f677ff75d6a2932175722c92c3d42c30515b48 (diff)
add --fetch-grammars and --build-grammars CLI flags
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/args.rs4
-rw-r--r--helix-term/src/main.rs18
2 files changed, 14 insertions, 8 deletions
diff --git a/helix-term/src/args.rs b/helix-term/src/args.rs
index 11bad08c..80076528 100644
--- a/helix-term/src/args.rs
+++ b/helix-term/src/args.rs
@@ -9,6 +9,8 @@ pub struct Args {
pub health: bool,
pub health_arg: Option<String>,
pub load_tutor: bool,
+ pub fetch_grammars: bool,
+ pub build_grammars: bool,
pub verbosity: u64,
pub files: Vec<(PathBuf, Position)>,
pub edit_config: bool,
@@ -32,6 +34,8 @@ impl Args {
args.health = true;
args.health_arg = argv.next_if(|opt| !opt.starts_with('-'));
}
+ "--fetch-grammars" => args.fetch_grammars = true,
+ "--build-grammars" => args.build_grammars = true,
arg if arg.starts_with("--") => {
anyhow::bail!("unexpected double dash argument: {}", arg)
}
diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs
index 607f1f59..4f73c9b4 100644
--- a/helix-term/src/main.rs
+++ b/helix-term/src/main.rs
@@ -59,14 +59,16 @@ ARGS:
<files>... Sets the input file to use, position can also be specified via file[:row[:col]]
FLAGS:
- -h, --help Prints help information
- --edit-config Opens the helix config file
- --tutor Loads the tutorial
- --health [LANG] Checks for potential errors in editor setup
- If given, checks for config errors in language LANG
- -v Increases logging verbosity each use for up to 3 times
- (default file: {})
- -V, --version Prints version information
+ -h, --help Prints help information
+ --edit-config Opens the helix config file
+ --tutor Loads the tutorial
+ --health [LANG] Checks for potential errors in editor setup
+ If given, checks for config errors in language LANG
+ --fetch-grammars Fetches tree-sitter grammars listed in languages.toml
+ --build-grammars Builds tree-sitter grammars fetched with --fetch-grammars
+ -v Increases logging verbosity each use for up to 3 times
+ (default file: {})
+ -V, --version Prints version information
",
env!("CARGO_PKG_NAME"),
env!("VERSION_AND_GIT_HASH"),