Rainbow Brackets — color nested brackets, highlight pairs, mark unmatched ones

Disclaimer

Is this plugin open source? Yes
Is this plugin completely free? Yes
Is this plugin vibe-coded beyond the author’s ability to comprehend how it works? No — written with AI assistance, but it’s small (~150 lines of plain JS) and I understand how it works.
Community Directory: https://community.obsidian.md/plugins/rainbow-brackets


Nested brackets in plain text are hard to follow, so I made a small plugin for it. In the editor (Live Preview / Source mode) it:

  • colors () [] {} by nesting depth (like rainbow brackets in VS Code),
  • highlights the matching pair of the bracket at the cursor,
  • marks unmatched brackets in red.

Brackets inside code, math and frontmatter are ignored, as well as escaped \( and list markers like 1). Colors can be changed with a CSS snippet (see README).

Source: https://github.com/yndarra/obsidian-rainbow-brackets

Feedback and bug reports are welcome — here or on GitHub.

1 Like