Prettier plugin to format Vue in Markdown syntax used in VitePress and VuePress. Current stable version 0.0.10 (release cadence: irregular, maintained by brc-dd). Key differentiators: specifically targets Vue SFCs embedded in Markdown (e.g., `<script setup>`, `<template>`, `<style>`) within VitePress/VuePress projects, leveraging Prettier's plugin system to parse and reformat Vue-like content without interfering with standard Markdown formatting. Only peer dependency is Prettier ^3.5.3. Ships TypeScript types.
npm install prettier-plugin-vitepressNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Install plugin, configure .prettierrc, and see Vue SFC formatting inside Markdown.
Ensure your .prettierrc includes this plugin; do not expect it to format non-Vue code fences.
Update Prettier to ^3.5.3 or later.
Pin exact version if stability is critical, or monitor releases.
Add @prettier/plugin-vue to your Prettier config for standalone .vue files.
Use only in projects that use VitePress or VuePress.
Cast plugin config as needed.
List plugin at top-level plugins in .prettierrc.
Run `npm add -D prettier-plugin-vitepress` to install.
Use require.resolve: plugins: [require.resolve('prettier-plugin-vitepress')]Update Prettier to ^3.5.3 and ensure plugin is in plugins array.
Check Vue template/script/style syntax and fix any errors.
Simplify the Markdown structure; avoid nested Vue fences.