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.3.0.wasm"
  ]
}

Customize if necessary

{
  "typst": {
    "indentWidth": 3,
    "lineWidth": 78,
    "blankLinesUpperBound": 5
  },
  "plugins": [
    "https://plugins.dprint.dev/kachick/typstyle-0.3.0.wasm"
  ]
}

Order of determines the values

  1. typst section in dprint.json
  2. global config in dprint.json
  3. default 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