Awesome
<div align="center"> <a href="https://plugins.jetbrains.com/plugin/10080-rainbow-brackets"> <img src="./src/main/resources/META-INF/pluginIcon.svg" width="320" height="320" alt="logo"/> </a> </div> <h1 align="center">Intellij rainbow brackets</h1> <p align="center">🌈Rainbow Brackets for IntelliJ-based IDEs/Android Studio/HUAWEI DevEco Studio And <a href="https://github.com/izhangzhihao/intellij-rainbow-brackets/blob/2022.3/Fleet.md">Fleet</p> <p align="center"> <a href="https://plugins.jetbrains.com/plugin/10080-rainbow-brackets"><img src="https://img.shields.io/jetbrains/plugin/r/stars/10080?style=flat-square"></a> <a href="https://plugins.jetbrains.com/embeddable/install/10080"><img src="https://img.shields.io/jetbrains/plugin/d/10080-rainbow-brackets.svg?style=flat-square"></a> <a href="https://plugins.jetbrains.com/plugin/10080-rainbow-brackets"><img src="https://img.shields.io/jetbrains/plugin/v/10080-rainbow-brackets.svg?style=flat-square"></a> <a href="https://opencollective.com/intellij-rainbow-brackets#backer"><img src="https://img.shields.io/opencollective/backers/intellij-rainbow-brackets?style=flat-square"></a> <a href="https://opencollective.com/intellij-rainbow-brackets#sponsor"><img src="https://img.shields.io/opencollective/sponsors/intellij-rainbow-brackets?style=flat-square"></a> </p> <br>Table of contents
- Change log
- Fleet Support
- Core Features
- Compatibility
- Supported languages
- Install
- Screenshots
- Config file path
- Rainbow Brackets Lite
Core features
<li><a href="https://github.com/izhangzhihao/intellij-rainbow-brackets#java">Rainbowify various types brackets(Round,Squiggly,Square,Angle)</a></li> <li><a href="https://www.youtube.com/watch?v=8WRH59PQ5Dk">Rainbowify variables for more languages & config colors using color generator </a></li> <li><a href="https://github.com/izhangzhihao/intellij-rainbow-brackets#indent-highlighting">Rainbowify indent guidelines</a></li> <li><a href="https://github.com/izhangzhihao/intellij-rainbow-brackets#scope-highlighting">Scope highlighting</a></li> <li><a href="https://github.com/izhangzhihao/intellij-rainbow-brackets#htmlxml">Rainbowify tag name for XML/HTML</a></li> <li><a href="https://github.com/izhangzhihao/intellij-rainbow-brackets#yaml">Rainbowify property name for YAML/JSON</a></li> <li><a href="https://github.com/izhangzhihao/intellij-rainbow-brackets#customize-colors">Customize colors</a></li> <li><a href="https://github.com/izhangzhihao/intellij-rainbow-brackets#use-the-color-generator">Color generator</a></li> <li><a href="https://github.com/izhangzhihao/intellij-rainbow-brackets#javascript--typescript">JSX support</a></li> <li><a href="https://github.com/izhangzhihao/intellij-rainbow-brackets#python">Rainbowify Python keywords & indent guidelines</a></li> <li><a href="https://github.com/izhangzhihao/intellij-rainbow-brackets/discussions/2643">Scope highlighting for Python</a></li> <li><a href="https://github.com/izhangzhihao/intellij-rainbow-brackets/discussions/2644">Current Block Highlighting</a></li> <li><a href="https://github.com/izhangzhihao/intellij-rainbow-brackets#disable-rainbow-brackets-for-specific-languages">Block list support</a></li> <br/>Compatibility
IntelliJ IDEA(Ultimate/Community/Educational), PhpStorm, WebStorm, PyCharm(Professional/Community/Educational), RubyMine, AppCode, CLion, CLion(Nova), Gogland, DataGrip, Rider, MPS, Android Studio, HUAWEI DevEco Studio, DataSpell, Code With Me(Host), RustRover, Aqua
Supported languages
Java, Scala, Clojure, Kotlin, Python, Haskell, Agda, Rust, JavaScript, TypeScript, Erlang, Go, Groovy, Ruby, Elixir, Objective-C, PHP, HTML, XML, SQL, Apex language, C#, F#, Dart, Pug/Jade, Bash, Vue.js, C# Razor Pages, GLSL(the OpenGL Shading Language), Go Template, C++, C, Solidity, Jinja2, Clang, CPP, C...
Install
<a href="https://plugins.jetbrains.com/embeddable/install/10080"> <img src="https://user-images.githubusercontent.com/12044174/123105697-94066100-d46a-11eb-9832-338cdf4e0612.png" width="300"/> </a>Install it inside your IDE:
For Windows & Linux - <kbd>File</kbd> > <kbd>Settings</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "Rainbow Brackets"</kbd> > <kbd>Install Plugin</kbd> > <kbd>Restart IntelliJ IDEA</kbd>
For Mac - <kbd>IntelliJ IDEA</kbd> > <kbd>Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "Rainbow Brackets"</kbd> > <kbd>Install Plugin</kbd> > <kbd>Restart IntelliJ IDEA</kbd>
Screenshots
Java
<img width="640" alt="java" src="https://user-images.githubusercontent.com/12044174/218252098-d73f3be1-849f-4193-a095-105b639d1955.png">Scala
<img width="640" alt="scala" src="https://user-images.githubusercontent.com/12044174/218252110-409c8dc0-3893-42c0-97f8-5855f88728bf.png">Clojure
<img width="640" alt="Clojure" src="https://user-images.githubusercontent.com/12044174/218252123-b2c2ae55-0501-46d5-81c0-4208f19958b3.png">Kotlin
<img width="640" alt="kotlin" src="https://user-images.githubusercontent.com/12044174/218252132-f6b0d17a-9d3b-47bc-be0c-918531ffb050.png">HTML/XML
NOTE: need to turn on the 'Rainbowify tag name' option
<img width="640" alt="HTML" src="https://user-images.githubusercontent.com/12044174/218252140-926fb1cc-5836-4e9e-9a23-5d0a4d956c3c.png">Javascript & Typescript
NOTE: need to turn on the 'Rainbowify tag name' option
<img width="640" alt="js" src="https://user-images.githubusercontent.com/12044174/218252159-06337dbb-ee7a-47a6-92f7-64e29f7419da.png"> <img width="640" alt="ts" src="https://user-images.githubusercontent.com/12044174/218252164-1a0547a6-a423-4a07-aa80-5200a5660aa6.png">C#
<img width="640" alt="CSharp" src="https://user-images.githubusercontent.com/12044174/218252203-24057a01-79ba-44e5-834d-ac4414472583.png">Dart
<img width="640" alt="dart" src="https://user-images.githubusercontent.com/12044174/218252217-e526703d-d644-4e51-bb17-1273f3591dc4.png">Python
<img width="623" alt="image" src="https://user-images.githubusercontent.com/12044174/220900164-db6476ed-e4e8-4547-966a-2db89fe82651.png"> <img width="640" alt="python" src="https://user-images.githubusercontent.com/12044174/218252230-5e21ef7c-acc4-49be-80ff-8c8ed11538ad.png"> <img width="640" alt="image" src="https://github.com/izhangzhihao/intellij-rainbow-brackets/assets/12044174/e6fc7fe6-7cb5-448f-87f2-5411038fe32c">Pug/Jade
<img width="640" alt="pug" src="https://user-images.githubusercontent.com/12044174/218252187-1d581616-1b4a-4654-8d97-5fe9e9a505cf.png">YAML
To disable rainbowify tags for yaml, please follow: https://github.com/izhangzhihao/intellij-rainbow-brackets/discussions/2639#discussioncomment-6106439 <img width="640" alt="pug" src="https://github.com/izhangzhihao/intellij-rainbow-brackets/assets/12044174/b484249a-57a8-4335-9681-1e024199681f">
Indent highlighting
options:
<img width="800" alt="image" src="https://github.com/izhangzhihao/intellij-rainbow-brackets/assets/12044174/08b2a707-176f-437d-852c-1052d5652d7f">- Focus mode
- Only selected indent guide(free)
highlighting indent guideline only when you select this indent line <img width="800" alt="image" src="https://user-images.githubusercontent.com/12044174/229687079-6b66e842-7d60-426e-9741-9685f8d078aa.png">
- Only current indent guide
highlighting indent guide lines for current lines <img width="800" alt="image" src="https://user-images.githubusercontent.com/12044174/198995710-a7956ae3-b008-41f0-a391-caf5a39cd8dd.png">
- All indent guide related
highlighting all indent guide lines for current lines <img width="800" alt="image" src="https://user-images.githubusercontent.com/12044174/198984655-aedcec69-58c3-465f-b06a-279fd35068bd.png">
Scope highlighting
The highlight effects will not remove after releasing the shortcuts, but press the ESC
key can do this. You could also config Press any key to remove the highlighting effect
on the setting page.
<kbd>Ctrl + Button3</kbd>(Windows & Linux) or <kbd>Meta + Button3</kbd>(Mac):
NOTE: <kbd>Button3</kbd> means "Secondary Click (click or tap with two fingers)" on Mac os, "Right click" for Windows or Linux. NOTE: <kbd>Meta</kbd> means <kbd>command</kbd> on Mac os.
<img width="1000" alt="current-scope" src="https://user-images.githubusercontent.com/12044174/218252269-52373432-4054-4449-91f9-a968337b81ab.png"><kbd>Alt + Button3</kbd>(Windows & Linux) or <kbd>option + Button3</kbd>(Mac):
NOTE: <kbd>Button3</kbd> means "Secondary Click (click or tap with two fingers)" on Mac os, "Right click" for Windows or Linux.
<img width="1000" alt="rh" src="https://user-images.githubusercontent.com/12044174/218252282-305ece2c-e78a-453a-8558-e500d8d35c7d.png">looking forward to your screenshots(PR welcome!)
Customize colors
<kbd>Settings/Preferences</kbd> > <kbd>Editor</kbd> > <kbd>Color Scheme</kbd> > <kbd>Rainbow Brackets</kbd>:
<img width="849" alt="scheme" src="https://user-images.githubusercontent.com/12044174/218252304-5e22918f-5ab9-4bc2-8bfa-65d4614fc303.png">Config the number of colors?
<kbd>Settings/Preferences</kbd> > <kbd>Other Settings</kbd> > <kbd>Rainbow Brackets</kbd> > <kbd>Color</kbd> > Number of colors
: 5 or more
And you can use the color generator and configure your number of colors at the same time.
NOTE: For the default and Darcula color scheme(Editor -> Color Scheme -> Rainbow Brackets -> Scheme
) the color number is 10, for the other scheme the number is 5, if your number is bigger than the number, you can config them in the config file.
If the color does not exist, we will use the color generator to generate it for you.
Use the color generator
If you didn't like the built-in colors or want some new colors but don't want to try out and pick colors. Please use the color generator.
<kbd>Settings/Preferences</kbd> > <kbd>Rainbow Brackets</kbd> > <kbd>Color</kbd> > <kbd>Use color generator</kbd>
If you turn on this option, we will auto-generate some colors for you.
Advanced options for color generator
<img width="749" alt="image" src="https://user-images.githubusercontent.com/12044174/202852094-2da6945b-598e-4def-ab0c-331abdd6d3f8.png">hue
– Controls the hue of the generated color. You can pass a string representing a color name: red
, orange
, yellow
, green
, blue
, purple
, pink
and monochrome
are currently supported. If you pass a hexidecimal color string such as #00FFFF
, the color generator will extract its hue value and use that to generate colors.
luminosity
– Controls the luminosity of the generated color. You can specify a string containing bright
, light
or dark
.
Config file path
If you want to customize the advanced configuration, you could edit the config file and then restart your IDE.
The config file path is in APP_CONFIG/rainbow_brackets.xml
.
In MAC OS env maybe like ~/Library/Preferences/IntelliJIdea2020.2/options/rainbow_brackets.xml
.
If you are using the ToolBox, then it will be like ~/Library/ApplicationSupport/JetBrains/IntelliJIdea2020.2/options/rainbow_brackets.xml
In Linux env maybe like ~/.IntelliJIdea/config/options/rainbow_brackets.xml
.
In Windows env maybe like C:\Users\izhangzhihao\.IntelliJIdea2020.2\config\options\rainbow_brackets.xml
.
JSX support
To enable rainbow brackets for JSX like this:
var html = '<div><div><div>Hello</div></div></div>';
This plugin will automatically override color scheme property "HTML_CODE" cause our rainbow color been covered by intellij built-in functionality. You still could set <kbd>Settings/Preferences</kbd> > <kbd>Other Settings</kbd> > <kbd>Rainbow Brackets</kbd> > <kbd>Language Specific</kbd> > <kbd>Rainbowify JSX</kbd> in the config file to disable.
Kotlin function literal braces and arrow
To enable rainbow brackets for multiple-level lambda Kotlin code like this:
event.throwable?.let { throwable ->
IdeErrorsDialog.findPluginId(throwable)?.let { pluginId ->
PluginManager.getPlugin(pluginId)?.let { ideaPluginDescriptor ->
if (!ideaPluginDescriptor.isBundled) {
bean.pluginName = ideaPluginDescriptor.name
bean.pluginVersion = ideaPluginDescriptor.version
}
}
}
}
This plugin will automatically override the color scheme property "KOTLIN_FUNCTION_LITERAL_BRACES_AND_ARROW" cause our rainbow color is being covered by the Kotlin plugin's built-in functionality. You still could set <kbd>Settings/Preferences</kbd> > <kbd>Other Settings</kbd> > <kbd>Rainbow Brackets</kbd> > <kbd>Language Specific</kbd> > <kbd>Rainbowify Kotlin function literal braces and arrow</kbd> in the config page to disable.
Disable rainbow brackets for specific languages
<kbd>Settings/Preferences</kbd> > <kbd>Other Settings</kbd> > <kbd>Rainbow Brackets</kbd> > Do NOT rainbowify these languages (name or extension, comma separated)
:
NOTE: You can use name of language or extension of file name(The names should be lowercase).
Support Us
You can support us by the following actions:
- Buy a license here
- Star this project
- Share this plugin with your friends
- Rate this plugin on JetBrains plugin repository
- Make pull requests
- Report bugs
- Tell us your ideas
- Become a sponsor by donating on Open Collective
- Become a sponsor by donating with AliPay or WeChatPay
- Don't want to use Alipay's mobile App? If you could read Chinese, please use the official website to transfer your donation to my Alipay account(izhangzhihao@hotmail.com). Otherwise, you can try the English version of Alipay to transfer your donation.
Backers
Thank you to all our backers! ❤️ [Become a backer]
<a href="https://opencollective.com/intellij-rainbow-brackets#backers" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/backers.svg?width=890"></a>
Sponsors
Support this project by becoming a sponsor! 🌈 Your logo will show up here with a link to your website. [Become a sponsor]
<a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/0/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/1/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/2/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/3/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/4/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/5/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/6/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/7/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/8/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/9/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/9/avatar.svg"></a> <a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/10/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/10/avatar.svg"></a> <a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/11/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/11/avatar.svg"></a> <a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/12/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/12/avatar.svg"></a> <a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/13/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/13/avatar.svg"></a> <a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/14/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/14/avatar.svg"></a> <a href="https://opencollective.com/intellij-rainbow-brackets/sponsor/15/website" target="_blank"><img src="https://opencollective.com/intellij-rainbow-brackets/sponsor/15/avatar.svg"></a>
Rainbow Brackets Lite
This repo is used to compile a fully free version of our product for the community to use. This is because some users do not need the paid features and do not want to constantly update their software. An open-source, entirely free, and stable version is a good option for these users.
I believe this will benefit both the community and our team. The community will have access to a free version of our software, and our team will continue to receive support from those who appreciate and value the paid features.
Please download the Lite version here.
NOTE: the lite version does NOT support C# lang and NOT support C++ in the Rider IDE
Acknowledgements
Intellij-rainbow-brackets is heavily inspired by Rainbow Brackets for Visual Studio Code