reovim-plugin-pair 0.7.10

Rainbow brackets, matched pair highlighting, and auto-pair insertion for reovim
Documentation

Pair plugin for reovim - bracket matching, highlighting, and auto-pair insertion

This plugin provides:

  • Rainbow bracket coloring based on nesting depth (6-color cycle)
  • Matched pair highlighting when cursor is inside brackets
  • Bold + underline highlighting when cursor is directly ON a bracket
  • Unmatched bracket warning (red underline)
  • Auto-insertion of closing brackets with cursor positioning

Supported Brackets

  • Round brackets: ( )
  • Square brackets: [ ]
  • Curly brackets: { }

Note: Angle brackets <> are intentionally excluded as they conflict with operators (->, =>, <=, >=, <<, >>) in most languages.

Highlighting Behavior

Cursor Position Style
On bracket ( or ) Rainbow color + bold + underline
Inside (...) Rainbow color only
Unmatched bracket Red + underline

State Management

The plugin stores PairState in PluginStateRegistry, tracking:

  • Cached bracket depth information per buffer
  • Current matched pair (if cursor is inside or on a bracket)