Typst formatter as a dprint WASM plugin, powered by typstyle
dprint config add 'kachick/typstyle'This plugin delegates the formatter feature to the upstream typstyle-core crate.
Minimum
{
"plugins": [
"https://plugins.dprint.dev/kachick/typstyle-0.4.0.wasm"
]
}Customize if necessary
{
"typst": {
"indentWidth": 3,
"lineWidth": 78,
"blankLinesUpperBound": 5
},
"plugins": [
"https://plugins.dprint.dev/kachick/typstyle-0.4.0.wasm"
]
}- typst section in dprint.json
- global config in dprint.json
- default values in typstyle-core
| dprint-plugin-typstyle | dprint global config | typstyle-core | typstyle CLI |
|---|---|---|---|
| lineWidth | lineWidth | max_width | column |
| indentWidth | indentWidth | tab_spaces | tab-width |
| blankLinesUpperBound | none |
blank_lines_upper_bound | none |
| reorderImportItems | none |
reorder_import_items | no-reorder-import-items # disable |
| wrapText | none |
wrap_text | wrap-text |
Versions are updated based on changes in dprint and typestyle-core, and do not correspond to upstream version numbers.