Skip to content

slidevjs/prettier-plugin

Repository files navigation

prettier-plugin-slidev

A Prettier plugin for Slidev.

Install

npm i -D prettier prettier-plugin-slidev

Activate the plugin

Create or modify your prettier configuration file to activate the plugin:

{
  "overrides": [
    {
      "files": ["slides.md", "pages/*.md"],
      "options": {
        "parser": "slidev",
        "plugins": ["prettier-plugin-slidev"]
      }
    }
  ]
}

Note that only specifying plugins is not enough, because Slidev and common Markdown files share the same file extension .md.