npm i -D prettier prettier-plugin-slidev
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
.