Skip to content

createBracketMatchPlugin

createBracketMatchPlugin(options?): EditorPlugin

Highlights the bracket pair around the caret and contributes editor.action.jumpToBracket.

Pairing uses the bracket list from the structural parse rather than a text scan, so brackets inside strings and comments are already excluded. When the parse has not produced brackets for the caret’s region yet, nothing is painted — a missing highlight is honest, a wrong one is not.

EditorBracketMatchPluginOptions

EditorPlugin