You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[folding] Support flags on folding.markers RegExps #72989
A language-configuration.json file can supply a pair of regular expressions start and end(doc). At the moment there's no way to specify regexp flags, for example to make the matches case-insensitive.
Previous enhancements tackled a similar issue for wordPattern and indentationRules by allowing their regexps to be objects with pattern and flags properties.
Please enhance languageConfigurationExtensionPoint.ts (code pointer) to support pattern and flags on start and end. See also #27591 (comment)
It'd also be good to augment the doc , which currently doesn't mention the pattern+flags syntax.
Reacted by kirides, João Henrique, Gabriel DeBacker, Anton Grigorev, RedCMD and Zachary Norman
Yes please.
I'm in the process of writing an extension to manage some legacy language that features words that would make a "marker" for folding. These words can be any cAsE.
in other places it worked to do (?i:CaSeInSensITIVE)
but i painfully already discovered these start and end regexes are less powerfull than otherplace. you also cannot use capture group reference between them to make sure sections are matched.
You cannot provide a list of pairs. you do not have context of next/previous line, making you even unable to recreate the built-in indentation folder.
Activity
[-]Support flags on folding.markers RegExps[/-][+][folding] Support flags on folding.markers RegExps[/+]kirides commentedon May 28, 2019
Yes please.
I'm in the process of writing an extension to manage some legacy language that features words that would make a "marker" for folding. These words can be any cAsE.
mithom commentedon Sep 29, 2025
in other places it worked to do
(?i:CaSeInSensITIVE)but i painfully already discovered these start and end regexes are less powerfull than otherplace. you also cannot use capture group reference between them to make sure sections are matched.
You cannot provide a list of pairs. you do not have context of next/previous line, making you even unable to recreate the built-in indentation folder.
jibbius commentedon Apr 24, 2026
This feature appears to have been silently delivered already.
See commit: 9794671
This syntax works for me:
Remaining:
Incorrect type. Expected: "string"