<!--
  canonical-url: https://www.avonture.be/blog/vscode-markdown-code-folding
  published:     2023-11-03
  This is a static plain-Markdown mirror generated at build time.
  Visit the canonical URL above for the fully rendered page, with images and interactive components.
-->

# Markdown folding not working

> Fix your VS Code Markdown code folding issue! Learn why folding may not be working and discover the simple solution to enable code blocks and headings folding for a cleaner editing experience.

---
![Markdown folding not working](/img/v2/vscode_tips.webp)

**TL;DR**

This article fixes a case where code folding doesn't work in VSCode's Markdown editor: make sure the built-in `@builtin Markdown Language Features` extension is enabled.

> <https://github.com/microsoft/vscode/issues/107130>

In case code folding is not working in markdown mode as illustrated below, make sure the `@builtin Markdown Language Features` addon is enabled. *That same built-in extension powers [sticky scroll](/blog/vscode-sticky-scroll) in Markdown files, which stops working for the same reason.*

![code\_folding](./images/code_folding.gif)

![Markdown Language Features](./images/markdown_language_features.webp)

Once folding works again, you may want more control over *what* gets folded: [Working with regions in VSCode](/blog/vscode-regions) shows how to define your own foldable blocks, even in file types VSCode doesn't support natively.
