A VS Code extension tailored for MkDocs Material
- Flags common syntax mistakes in the Problems panel
- Adds clearer visual cues for blocks, tables, and inline features
- Ships with built‑in light/dark themes for best results
If you write MkDocs Material docs (admonitions, content tabs, tables, task lists, etc.), this helps you catch issues early and keep docs readable.
Two built-in themes are provided for best highlighting:
VS Code → Preferences → Color Theme → select one of the above.
You can also use diagnostics without switching themes.
We highly recommend using the provided themes to get the full benefit of the extension, but diagnostics will work regardless of theme.
| Area | Rule | Example |
|---|---|---|
| Admonition | marker must have a type | !!! note, ???+ question |
| Admonition | type must be a simple identifier | letters/numbers/_/- |
| Admonition | unknown type → warning | !!! foo |
| Admonition | title quotes must close | !!! note "Title" |
| Admonition | content must be indented | 4 spaces or 1 tab |
| Admonition | blank line before non‑list content | list can follow immediately |
| Tabs | must be === "Title" or === 'Title' |
quotes required |
| Tabs | content must be indented | 4 spaces or 1 tab |
| Lists | marker must be followed by a space | - item, 1. item |
| Lists | blank line before a list in normal text | avoids -item look |
| Tables | header must be followed by separator | ` |
| Tables | separator column count must match header | consistent columns |
| Code blocks | fence must be closed | ``` / ~~~ |
| Math | $$ blocks must be closed |
$$ ... $$ |
- Admonitions: narrow color bars + subtle background (nested blocks show multiple bars)
- Tables: soft background + stronger header + outer border + row separators
- Headings, blockquotes, icons/emojis, math, footnotes, etc. are more distinct
- Code blocks: dark background with light text for readability
- Markdown (
.md) - MDX (
.mdx)
You can customize the linter behavior in VS Code settings:
| Setting | Default | Description |
|---|---|---|
checkBlankLineBeforeList |
true |
Require blank line before lists in normal text |
checkBlankLineBeforeAdmonitionContent |
false |
Require blank line before admonition content (except lists) |
checkIndentation |
true |
Check indentation for admonitions and tabs |
Example (settings.json):
{
"mkdocs-material-linter.checkBlankLineBeforeList": true,
"mkdocs-material-linter.checkBlankLineBeforeAdmonitionContent": false,
"mkdocs-material-linter.checkIndentation": true
}VS Code doesn't have built-in shortcuts for some of the rich text format shortcuts MkDocs Material supports. Here are some useful ones:
- Underline (MkDocs
^^underline^^):Ctrl+U/Cmd+U
!!! note "Title"
This is valid.
???+ question "FAQ"
- First item
- Second item
=== "Tab A"
Tab content.
| Method | Description |
| --- | --- |
| GET | Fetch |!!!note
Text not indented.
=== Tab A
Missing quotes.
-item
1.item












