Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Mkdocs Material LinterNew to Visual Studio Code? Get it now.
Mkdocs Material Linter

Mkdocs Material Linter

ytianle

|
186 installs
| (1) | Free
A VS Code linter and highlighter for MkDocs Material syntax (admonitions, tabs, tables, and more).
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MkDocs Material Linter logo

MkDocs Material Linter

A VS Code extension tailored for MkDocs Material

Features:

  • 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

1. Who It’s For

If you write MkDocs Material docs (admonitions, content tabs, tables, task lists, etc.), this helps you catch issues early and keep docs readable.

2. Best Practices

  1. Heading styles
    headings

  2. Admonition highlight
    admonition

  3. Nested admonition bars
    nested-admonition

  4. Tables (border + header)
    tables

  5. Tabs syntax
    tabs

  6. Diagnostics in Problems panel
    diagnostics

  7. Math blocks
    math

  8. Blockquotes
    blockquotes

  9. Code blocks
    code-blocks

  10. Front matter (---)
    front-matter

  11. Images
    images

  12. Icons & emojis
    icons-emojis

  13. Footnotes & tooltips
    footnotes-tooltips

3. Themes

Two built-in themes are provided for best highlighting:

  • MkDocs Material Linter (Light) light-theme
  • MkDocs Material Linter (Dark) dark-theme

VS Code → Preferences → Color Theme → select one of the above.
You can also use diagnostics without switching themes.

4. Theory about What It Does

We highly recommend using the provided themes to get the full benefit of the extension, but diagnostics will work regardless of theme.

4.1 Diagnostics (Errors/Warnings)

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 $$ ... $$

4.2 Visual Cues

  • 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

5. Supported Files

  • Markdown (.md)
  • MDX (.mdx)

6. Configuration

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
}

7. Additional Shortcuts

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

8. Quick Diagnose

8.1 Correct

!!! note "Title"
    This is valid.

???+ question "FAQ"
    - First item
    - Second item

=== "Tab A"
    Tab content.

| Method | Description |
| --- | --- |
| GET | Fetch |

8.2 Common Mistakes

!!!note
Text not indented.

=== Tab A
    Missing quotes.

-item
1.item
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft