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

Customize if necessary

{
  "typst": {
    "tab_spaces": 3,
    "column": 78,
    "blank_lines_upper_bound": 5
  },
  "plugins": [
    "https://plugins.dprint.dev/kachick/typstyle-0.2.7.wasm"
  ]
}

Order of determines the default

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

List of options

dprint-plugin-typstyle dprint global config typstyle
column lineWidth column(max_width)
tab_spaces indentWidth tab_spaces
blank_lines_upper_bound none blank_lines_upper_bound