Skip to content

createBracketColorsPlugin

createBracketColorsPlugin(options?): EditorPlugin

Colours bracket characters by the nesting depth of the pair they belong to, rotating through the registered level palette.

Off until a host installs it: the affordance divides opinion, and it overrides the grammar’s own colouring of those characters. Depth comes from the structural parse, so brackets inside strings and comments are not part of the nesting and nothing is painted before a parse has covered the document — a plausible-looking wrong depth is worse here than no colour at all.

BracketColorsPluginOptions

EditorPlugin