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

|
50 installs
| (1) | 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

VS Code Marketplace Version VS Code Marketplace Installs VS Code Marketplace Rating GitHub Release

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

Install from the VS Code Marketplace.

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
  • Supports VS Code 1.53.0 and newer

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
  • VSCODE_TEST_VERSION=1.53.0 npm test to run the suite against a specific VS Code version
  • 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
  • A separate GitHub Actions workflow publishes the same VSIX to the VS Code Marketplace using the VSCE_PAT repository secret
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft