Adapter for kdl-rs for use as a formatting plugin in dprint. It formats KDL files (.kdl).
Originally created by Kenichi Kamiya.
Then in your project's directory with a dprint.json file, run:
dprint add kdlBy default, it formats as KDL 2.0 and works with no configuration.
If you only format KDL v1 documents, you can use the "kdlVersion" option:
{
"kdl": {
"kdlVersion": "v1"
}
}Some famous applications still use KDL v1 for now:
If your repository has mixed versions of KDL files, consider adding a version marker line to the top of your files:
/- kdl-version 1
simplified_ui true/- kdl-version 2
simplified_ui #trueThis version marker is defined as an optional hint in the KDL specification.
When placed on the first line, this plugin formats the file with that version,
even if kdlVersion in dprint.json says otherwise.
- JS Formatter - Browser/Deno and Node
- npm package
This repo automatically upgrades to the latest version of kdl-rs once a day. You can check which version of kdl-rs is being used by looking at the kdl entry in the Cargo.toml file in this repo:
https://github.com/dprint/dprint-plugin-kdl/blob/main/Cargo.toml
At the moment, the version of this plugin does not reflect the version of kdl-rs.
This project is licensed under the Apache License 2.0 - see the LICENSE and NOTICE files for details.