Folding Strategy: Brackets
Author: RedCMDCreated Apr 29, 2026Updated Sep 17, 2026
Labelsfeature-requesteditor-folding
partially continuation of #264780
Currently VSCode's editor.foldingStrategy supports
auto- Use a language-specific folding strategy if available, else the indentation-based one.indentation- Use the indentation-based folding strategy.
I propose a 3rd option - brackets
this would use VSCode's new bracket pair colourizer to supply the folding ranges
https://code.visualstudio.com/updates/v1_60#_high-performance-bracket-pair-colorization
the bracket pair colourizer is quite performant, already built-in and correctly handles TextMate standard token types
(which the current whitespace indention strat, language-configuration.json indentationRules, and often language extensions don't support embedded TextMate grammars)
and maybe a 4th option for brackets & indentation?
Source: microsoft/vscode