49 releases (breaking)
new 0.35.2 | Mar 6, 2021 |
---|---|
0.34.0 | Dec 27, 2020 |
0.33.1 | Nov 30, 2020 |
0.25.0 | Jul 27, 2020 |
0.4.0 | Nov 4, 2019 |
#47 in Value formatting
14,755 downloads per month
Used in 9 crates
(5 directly)
175KB
4K
SLoC
dprint-core
Rust crate for common dprint code.
Features:
formatting
- Code to help build a code formatter in Rust (not required for creating a plugin).process
- Code to help build a "process plugin"wasm
- Code to help build a "wasm plugin" (recommended over process plugins)
Api
Use:
let result = dprint_core::formatting::format(|| {
let print_items = ...; // parsed out IR (see example below)
print_items
}, PrintOptions {
indent_width: 4,
max_width: 10,
use_tabs: false,
newline_kind: "\n",
});
Example
See overview.md.
Dependencies
~0.5–1.5MB
~35K SLoC