Universal RegionsUniversal Regions adds language-agnostic, token-delimited regions to every file type except extensions you explicitly exclude. A completed region is shaded and can be folded. An opened region with no matching end token is shaded red from its start through the end of the document. ConfigurationAdd settings such as these to your VS Code settings JSON:
Each start token is paired with the end token at the same list index. Both lists should therefore have the same number of entries. Unpaired entries are ignored. Tokens must not contain whitespace. The label is the remaining text after the opening token on that line. A normal region's color is deterministic from that label and the opening line number. After changing Universal Regions settings, VS Code recomputes the folding ranges for open files automatically. Pairing rulesRegions use a single stack. Opening tokens are pushed; an end token closes only the most recently opened region when it has the corresponding configured token pair. This means nested regions pair naturally. An end token that does not match the top open region is ignored, leaving that region visibly unclosed until a valid matching end token is encountered. VS Code's standard Fold command and gutter controls expose the collapsible regions. Universal Regions uses a wildcard folding provider, so VS Code requests its regions alongside the folding providers registered by every language extension. Test in VS Code
The launch configuration compiles the TypeScript first. It requires Node.js and npm to be installed and available on your PATH. |