dprint-config
Strongly-typed configuration structs and JSON Schema for dprint formatter plugins (TypeScript, JSON, TOML, Markdown). Used by Lintel to pass user formatting options through to dprint.
Features
- Typed configuration structs for dprint global settings and per-plugin options
- Covers TypeScript, JSON, TOML, and Markdown plugins
- Unknown plugins fall through to a generic
PluginConfigwith arbitrary settings - JSON Schema generation via
schemars #[no_std]compatible
Usage
use DprintConfig;
let json = r#"{ "lineWidth": 100, "json": { "indentWidth": 4 } }"#;
let config: DprintConfig = from_str.unwrap;
assert_eq!;
License
Apache-2.0