Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>MDN Macros SyntaxNew to Visual Studio Code? Get it now.
MDN Macros Syntax

MDN Macros Syntax

tristantheb

|
2 installs
| (0) | Free
Syntax highlighting, snippets, hover and diagnostics for MDN macros
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MDN Macros Syntax VSCode Extension

This extension provides syntax highlighting and snippets for MDN Macros in Visual Studio Code.

Features

Code Highlighting

The MDN code blocks have 3 keyword types: interactive-example, example-bad, and example-good. Each keyword type has its own color scheme for better readability.

Code Highlighting in light theme Code Highlighting in dark theme

Macros snippets and syntax coloring

All MDN Macros have snippets and syntax coloring to help you write MDN Macros quickly and accurately.

For example, trying to type {{Glossary will suggest the full macro with a description:

Example of Glossary completion

The plugin also provide a typo explainer when a macro is not recognized:

{{glossary("")}} // Unknown MDN macro: glossary. Did you mean 'Glossary'? `mdn-macros(unknownMacro)`
{{Glossary("")}}

Quick fix macros

When a macro is not recognized, a quick fix suggestion is provided to replace it with the correct macro name:

The error message on the hover tooltip

The quick fix suggestion menu when you click on the "Quick Fix" lightbulb

Deprecated macros warning

When a deprecated macro is used, a warning is shown on hover with information about the deprecation and suggested alternatives.

The deprecation warning on the hover tooltip

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft