Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

dprint-plugin-svg

A dprint Wasm plugin for formatting SVG files.

Install

dprint config add kjanat/svg

Quick start

Add plugin-level options under the "svg" key in your dprint config:

{
  "svg": {
    "attributeSort": "canonical",
    "attributeLayout": "auto",
    "spaceBeforeSelfClose": true
  },
  "plugins": [
    "https://plugins.dprint.dev/kjanat/svg-v0.1.0.wasm"
  ]
}

Global config inheritance

Several options fall back to dprint global config when omitted:

Plugin optionFalls back to
lineWidthlineWidth (default 100)
useTabsuseTabs (default true)
indentWidthindentWidth (default 2)
newLineKindnewLineKind (default "auto")

All other options use plugin-specific defaults documented in each page.

Configuration reference

Browse the sidebar for per-option documentation with before/after examples.