Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Markdown Code Block Fold SupportNew to Visual Studio Code? Get it now.
Markdown Code Block Fold Support

Markdown Code Block Fold Support

YiJie

| (0) | Free
Adds folding support for structured content inside Markdown fenced code blocks across JSON, JS/TS, CSS, YAML, and HTML-like languages.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Markdown Code Block Fold Support

This extension adds folding ranges for structured content inside Markdown fenced code blocks.

Current scope

  • Supports json, jsonc, javascript, typescript, jsx, tsx, css, scss, less, yaml, yml, html, xml, svg, vue, and svelte fenced blocks inside Markdown
  • Keeps the folding engine language-pluggable for more embedded languages later
  • Works alongside the normal Markdown code fence folding

Usage

Open a Markdown file containing a fenced JSON block such as:

```json
{
  "outer": {
    "items": [
      {
        "value": 1
      }
    ]
  }
}
```

Then use the normal VS Code folding controls inside the code block.

Configuration

markdownCodeBlockFoldSupport.enabledLanguages

  • Default: ["json", "jsonc", "javascript", "javascriptreact", "js", "jsx", "typescript", "typescriptreact", "ts", "tsx", "mjs", "cjs", "css", "scss", "less", "yaml", "yml", "html", "xml", "xhtml", "svg", "vue", "svelte"]
  • Controls which fenced languages contribute extra folding ranges in Markdown documents

Development

  • npm install
  • npm run compile
  • Press F5 in VS Code to launch the extension host
  • npm test to run the integration test suite
  • npm run package to build a .vsix

Release

  • Run npm test
  • Run npm run package:release
  • Commit the generated release-assets/markdown-codeblock-fold-support-<version>.vsix
  • Push to main
  • When package.json contains a version that does not already have a matching vX.Y.Z tag, GitHub Actions will tag and publish a GitHub Release automatically
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft