Prism Brackets – Rainbow Bracket Highlighter for VS Code
Fast, zero-lag rainbow bracket highlighting with scope visualization, vertical guides, and smart parsing.
🌈 Prism Brackets
Advanced rainbow bracket highlighting with glow, multi-language support, and smart parsing.
Improve readability • Reduce errors • Code faster
✨ Clean code starts with clear brackets
🚀 Overview
Prism Brackets is a high-performance Visual Studio Code extension that brings powerful bracket visualization, structural awareness, and intelligent code navigation to your editor.
✨ Features
- 🌈 Depth-Based Rainbow Colors — Dynamic HSL color generation with 60+ unique nesting levels, powered by a custom golden-angle distribution algorithm for clear visual separation.
- ⚡ Zero-Lag Architecture — High-performance incremental parser that tracks VS Code document versions, eliminating expensive full-text rescans.
- 🟥 Smart Error Detection — Instantly highlights unmatched opening and closing brackets with vivid red wavy underlines.
- 🎯 Advanced Scope Highlighting — Highlights the active code block with elegant theme-aware borders, vertical scope guides, and optional neon glow.
- 🧠 Context-Aware Parsing — Correctly ignores brackets inside strings, escaped characters, and both single-line and multi-line comments.
- 💬 Interactive Hover Insights — Hover over any bracket to view nesting depth, matching pair information, and scope context in real time.
- 🔍 Focus Mode — Automatically dims surrounding code, keeping your current scope visually isolated for distraction-free editing.
- 🔘 Quick Controls — Enable or disable Prism Brackets and toggle glow effects instantly from the VS Code status bar.
- 🌍 Multi-Language Support — Works across JavaScript, TypeScript, Python, Java, C/C++, HTML, JSON, SQL, PHP (including partial Laravel Blade support), and more.
- 🎨 Theme Aware — Automatically adapts decorations for both dark and light VS Code themes.
🌍 Supported Languages
- JavaScript / TypeScript
- Python
- HTML / JSON
- SQL
- C / C++
- Java
- PHP / Laravel Blade (partial support)
🖼️ Preview
Installation
ext install Naveendev.prismbrackets
Contributing
git clone https://github.com/thephotogenicbug/prismbrackets.git
cd prismbrackets
npm install
npm run watch
Project Structure
src/
├── commands/
│ └── toggle.ts # Enable/disable + glow toggle commands
├── decorations/
│ └── decorations.ts # VS Code decoration creation & management
├── features/
│ ├── colorize.ts # Core bracket coloring logic
│ └── match.ts # Matching bracket highlight logic
├── utils/
│ ├── colors.ts # Color generation (theme-aware)
│ ├── debounce.ts # Performance optimization
│ └── languageConfig.ts # Language-specific parsing rules
├── extension.ts # Entry point (activation + listeners)
├── state.ts # Global state (enabled, glow)
Made with ❤️ by Naveen