mirror of
https://github.com/google/comprehensive-rust.git
synced 2024-12-15 14:27:50 +02:00
aaca44f62b
The dprint formatter is a flexible system which will use sandboxed WebAssembly formatters to format our code (mostly: it calls out to `rustfmt` for Rust code). A particularly interesting feature is that dprint can format Rust code blocks in the Markdown files. However, before we turn that on, we need to have a way to normalize the Markdown text as it is extracted[1]. That is so that the word put into the translations is kept after the reformatting. [1]: https://github.com/google/mdbook-i18n-helpers/issues/19
31 lines
666 B
JSON
31 lines
666 B
JSON
{
|
|
"lineWidth": 80,
|
|
"json": {},
|
|
"markdown": {
|
|
"textWrap": "always"
|
|
},
|
|
"toml": {},
|
|
"exec": {
|
|
"associations": "**/*.rs",
|
|
"rustfmt": "rustfmt --edition 2021",
|
|
"rustfmt.associations": "**/*.rs"
|
|
},
|
|
"includes": [
|
|
"**/*.json",
|
|
"**/*.md",
|
|
"**/*.rs",
|
|
"**/*.toml"
|
|
],
|
|
"excludes": [
|
|
"/src/",
|
|
"/third_party/",
|
|
"target/"
|
|
],
|
|
"plugins": [
|
|
"https://plugins.dprint.dev/exec-0.3.5.json@d687dda57be0fe9a0088ccdaefa5147649ff24127d8b3ea227536c68ee7abeab",
|
|
"https://plugins.dprint.dev/json-0.17.2.wasm",
|
|
"https://plugins.dprint.dev/markdown-0.15.2.wasm",
|
|
"https://plugins.dprint.dev/toml-0.5.4.wasm"
|
|
]
|
|
}
|