diff --git a/helix-term/src/args.rs b/helix-term/src/args.rs index 3e50f66f7fd0f..a1fca46525e1b 100644 --- a/helix-term/src/args.rs +++ b/helix-term/src/args.rs @@ -7,6 +7,8 @@ pub struct Args { pub display_help: bool, pub display_version: bool, pub load_tutor: bool, + pub fetch_grammars: bool, + pub build_grammars: bool, pub verbosity: u64, pub files: Vec<(PathBuf, Position)>, } @@ -25,6 +27,8 @@ impl Args { "--version" => args.display_version = true, "--help" => args.display_help = true, "--tutor" => args.load_tutor = true, + "--fetch-grammars" => args.fetch_grammars = true, + "--build-grammars" => args.build_grammars = true, arg if arg.starts_with("--") => { return Err(Error::msg(format!( "unexpected double dash argument: {}", diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs index 0f504046ff8f5..d5ea63bb66bab 100644 --- a/helix-term/src/main.rs +++ b/helix-term/src/main.rs @@ -59,11 +59,13 @@ ARGS: ... Sets the input file to use, position can also be specified via file[:row[:col]] FLAGS: - -h, --help Prints help information - --tutor Loads the tutorial - -v Increases logging verbosity each use for up to 3 times - (default file: {}) - -V, --version Prints version information + -h, --help Prints help information + --tutor Loads the tutorial + --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"),