pub fn load(
explicit: Option<&Path>,
start_dir: &Path,
input_file: Option<&Path>,
) -> Result<(Config, Option<PathBuf>)>Expand description
Load configuration with precedence:
- explicit path (error if unreadable/invalid)
- walk up from start_dir: .panache.toml, panache.toml
- XDG: $XDG_CONFIG_HOME/panache/config.toml or ~/.config/panache/config.toml
- default config
Flavor detection logic (when input_file is provided):
- .qmd files: Always use Quarto flavor
- .Rmd files: Always use RMarkdown flavor
- Markdown-family files (.md/.markdown/.mdown/.mkd): Use most-specific
flavor-overridesmatch when provided, else useflavorfrom config - Other extensions: Use
flavorfrom config
The flavor config field determines the default flavor for stdin and files
without a matching extension override.