Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Comment Markdown RenderNew to Visual Studio Code? Get it now.
Comment Markdown Render

Comment Markdown Render

Axel Delaval

|
4 installs
| (0) | Free
Render Markdown and LaTeX when hovering comments
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
Comment Markdown Render Icon *[Axel Delaval](https://axeldlv00.github.io/axel-delaval-personal-page/) • February 22th 2026*

GitHub License

Comment Markdown Render

A Visual Studio Code extension that renders Markdown content directly within code comments, including support for LaTeX math expressions. It handles most common comment styles across various programming languages, including multi-line block comments and stacked single-line comments.

The original motivation was to be able to code in most languages as in a Jupyter notebook, particularly in Formalization languages (e.g., Lean4) where rendering mathematical formulas is particularly useful.

Example

As shown below, when hovering over a comment block starting with the md prefix, the extension renders the Markdown content.

Example of the extension in action

How to Use

To trigger the Markdown rendering, simply start your comment with the md prefix.

Multi-line Blocks

The extension supports standard block comments across most languages:

/** md
 * # Documentation
 * This is a **JSDoc** comment with math:
 * $$ \frac{-b \pm \sqrt{b^2-4ac}}{2a} $$
 */
""" md
# Python Docstring
You can use *Markdown* here too!
- Item 1
- Item 2
"""

Single-line Comments

You can also stack single-line comments:

// md # Title
// md This is a list:
// md 1. First point
// md 2. Second point with $\alpha$

Supported Comment Styles

Syntax Languages
/* md ... */ or /** md ... */ JS, TS, C++, Java, CSS, etc.
""" md ... """ Python, Julia
''' md ... ''' Python
/- md ... -/ Lean4
// md C-style languages
# md Python, Ruby, YAML, Bash
-- md Lua, Haskell, SQL
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft