Skip to content

kachick/dprint-plugin-typstyle

Repository files navigation

dprint-plugin-typstyle

CI - Nix Status

Typst formatter as a dprint WASM plugin, powered by typstyle

Installation

dprint config add 'kachick/typstyle'

This plugin delegates the formatter feature to the upstream typstyle-core crate.

Configuration example

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"
  ]
}

Order of determines the values

  1. typst section in dprint.json
  2. global config in dprint.json
  3. default values in typstyle-core

Relationships of the option names

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

Versioning

Versions are updated based on changes in dprint and typestyle-core, and do not correspond to upstream version numbers.

About

Typst formatter as a dprint WASM plugin

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 5