on master help sign in
add --fetch-grammars and --build-grammars CLI flags
commit8330f6af202f0a9f681d94c7aec586cf5416e0c9 authorMichael Davis <mcarsondavis@gmail.com> dateSun 13 Feb 2022, 20:08 (5 years ago) parentc1f677f
2 files changed+14−8
helix-term/src/args.rs+4 helix-term/src/main.rs+10−8
helix-term/src/args.rs+4
@@ -9,6 +9,8 @@ pub struct Args {
99 pub health: bool,
1010 pub health_arg: Option<String>,
1111 pub load_tutor: bool,
12+ pub fetch_grammars: bool,
13+ pub build_grammars: bool,
1214 pub verbosity: u64,
1315 pub files: Vec<(PathBuf, Position)>,
1416 pub edit_config: bool,
@@ -32,6 +34,8 @@ impl Args {
3234 args.health = true;
3335 args.health_arg = argv.next_if(|opt| !opt.starts_with('-'));
3436 }
37+ "--fetch-grammars" => args.fetch_grammars = true,
38+ "--build-grammars" => args.build_grammars = true,
3539 arg if arg.starts_with("--") => {
3640 anyhow::bail!("unexpected double dash argument: {}", arg)
3741 }
helix-term/src/main.rs+10−8
@@ -59,14 +59,16 @@ ARGS:
5959 <files>... Sets the input file to use, position can also be specified via file[:row[:col]]
6060
6161FLAGS:
62− -h, --help Prints help information
63− --edit-config Opens the helix config file
64− --tutor Loads the tutorial
65− --health [LANG] Checks for potential errors in editor setup
66− If given, checks for config errors in language LANG
67− -v Increases logging verbosity each use for up to 3 times
68− (default file: {})
69− -V, --version Prints version information
62+ -h, --help Prints help information
63+ --edit-config Opens the helix config file
64+ --tutor Loads the tutorial
65+ --health [LANG] Checks for potential errors in editor setup
66+ If given, checks for config errors in language LANG
67+ --fetch-grammars Fetches tree-sitter grammars listed in languages.toml
68+ --build-grammars Builds tree-sitter grammars fetched with --fetch-grammars
69+ -v Increases logging verbosity each use for up to 3 times
70+ (default file: {})
71+ -V, --version Prints version information
7072",
7173 env!("CARGO_PKG_NAME"),
7274 env!("VERSION_AND_GIT_HASH"),