add --fetch-grammars and --build-grammars CLI flags
This commit is contained in:
parent
c1f677ff75
commit
8330f6af20
2 changed files with 14 additions and 8 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -64,6 +64,8 @@ FLAGS:
|
|||
--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
|
||||
|
|
Loading…
Reference in a new issue