cli: Missing config file shouldn't be an error
Just fall back on the default values for each configuration option.
This commit is contained in:
parent
e841fcfa1b
commit
b44270efab
3 changed files with 22 additions and 11 deletions
|
|
@ -183,6 +183,10 @@ fn run() -> Result<()> {
|
|||
config.add(tree_sitter_loader::Config::initial())?;
|
||||
config.add(tree_sitter_cli::highlight::ThemeConfig::default())?;
|
||||
config.save()?;
|
||||
println!(
|
||||
"Saved initial configuration to {}",
|
||||
config.location.display()
|
||||
);
|
||||
} else if let Some(matches) = matches.subcommand_matches("generate") {
|
||||
let grammar_path = matches.value_of("grammar-path");
|
||||
let report_symbol_name = matches.value_of("report-states-for-rule").or_else(|| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue