Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>mdformat for VS CodeNew to Visual Studio Code? Get it now.
mdformat for VS Code

mdformat for VS Code

Jakub Gerec

|
2 installs
| (0) | Free
Format Markdown with mdformat and its plugins using uv.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

mdformat for VS Code

Format Markdown files with mdformat, an opinionated formatter for enforcing a consistent style.

The extension runs mdformat in an isolated environment managed by uv. It does not install mdformat globally or modify the project's Python environment.

Requirements

  • uv installed and available on PATH to the VS Code extension host.
  • Network access the first time uv resolves mdformat or a plugin. Later runs normally use uv's cache.

Usage

Open a Markdown document and select Format Document With..., then choose mdformat for VS Code. To make it the default Markdown formatter:

{
  "[markdown]": {
    "editor.defaultFormatter": "gerecj.mdformat-vscode"
  }
}

Settings

Plugins

mdformat.pluginPackages lists Python package requirements that uv uses with mdformat. mdformat-gfm and mdformat-frontmatter are included by default.

{
  "mdformat.pluginPackages": [
    "mdformat-gfm",
    "mdformat-frontmatter"
  ]
}

Arguments

mdformat.args provides additional mdformat CLI arguments. The extension uses --no-validate by default.

{
  "mdformat.args": ["--no-validate"]
}

See mdformat's command-line options for the available arguments.

.mdformat.toml

An applicable .mdformat.toml takes priority over mdformat.args.

wrap = 88
number = false
end_of_line = "keep"
validate = false
extensions = ["gfm", "frontmatter"]

How it runs

The effective command is equivalent to:

uv tool run --isolated --with mdformat-gfm --with mdformat-frontmatter mdformat -
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft