A Prettier plugin that formats Slidev markdown slides (slides.md, pages/*.md). Current stable version is 1.0.5, released as part of the official Slidev ecosystem. It uses a custom 'slidev' parser to handle Slidev-specific frontmatter, slide separators (---), and code block annotations. The plugin is released with the Slidev ecosystem, following minor version bumps as Slidev evolves. Key differentiator: it is the only dedicated formatter for Slidev slide files, ensuring consistent formatting for Slidev's markdown syntax without breaking slide structure.
npm install prettier-plugin-slidevVerified import paths — ran on the pinned version, not inferred.
Install the plugin, configure Prettier to use the slidev parser for Slidev markdown files, and format a slides.md file.
Upgrade Prettier to ^3.2.4
Adjust the 'files' glob in the override if you use different file names.
Always include 'parser: "slidev"' in the override options.
Remove other markdown-related Prettier plugins when using this one.
Install as a dev dependency: npm i -D prettier prettier-plugin-slidev
Add the override with parser: 'slidev' as shown in the configuration.
Set plugins to ["prettier-plugin-slidev"] in the config (JSON or YAML).