[go: nahoru, domu]

Skip to content

PlayTh/intellij-rainbow-brackets

 
 

Repository files navigation

Rainbow Brackets

Tweet Gitter Build Status codecov Rainbow Brackets Release Plugin downloads Plugin version contributions welcome

Rainbow Brackets / Rainbow Parentheses for IntelliJ IDEA based IDEs

Compatibility

IntelliJ IDEA, PhpStorm, WebStorm, PyCharm, RubyMine, AppCode, CLion, Gogland, DataGrip, Rider, MPS, Android Studio

Supported languages

Java, Scala, Clojure, Kotlin, Python, Haskell, Agda, Rust, JavaScript, TypeScript, Erlang, Go, Groovy, Ruby, Elixir, ObjectiveC, PHP, C#, HTML, XML, SQL, Apex language ...

Screenshots

  • with Java

  • with Scala

  • with Clojure

  • with Kotlin

  • with HTML/XML

  • looking forward to your screenshots...

Install

For Windows - File > Settings > Plugins > Browse repositories... > Search for "Rainbow Brackets" > Install Plugin > Restart IntelliJ IDEA

For Mac - IntelliJ IDEA > Preferences > Plugins > Browse repositories... > Search for "Rainbow Brackets" > Install Plugin > Restart IntelliJ IDEA

Config brackets colors

If you want to config the color, edit your config file and restart your IDE(APP_CONFIG/rainbow_brackets.xml), In my env(MAC os) is /Users/izhangzhihao/Library/Preferences/IntelliJIdea2018.1/options/rainbow_brackets.xml:

<option name="lightRoundBracketsColors">
   <array>
      <option value="0xE6B422" />
      <option value="0x43A047" />
      <option value="0x2196F3" />
      <option value="0x3F51B5" />
      <option value="0x00897B" />
   </array>
</option>

If you prefer using light theme, here is a example from @Avinash-Bhat gray config using Material Deisgn Color Tool, it works greate with light themed bg (basically white) but dark theme is not so good.

NOTE: The lightXXX and the darkXXX should be the same size!

The default colors:
var lightRoundBracketsColors = arrayOf(
        "0xE66A01",
        "0x1B5E20",
        "0x006BE7",
        "0x283593",
        "0x004D40"
)

var darkRoundBracketsColors = arrayOf(
        "0xE6B422",
        "0x43A047",
        "0x2196F3",
        "0x3F51B5",
        "0x00897B"
)

var lightSquareBracketsColors = arrayOf(
        "0x0B9087",
        "0x827717",
        "0x6444E6"
)

var darkSquareBracketsColors = arrayOf(
        "0x33CCFF",
        "0xD4E157",
        "0x8080FF"
)

var lightSquigglyBracketsColors = arrayOf(
        "0x0057D2",
        "0x558B2F",
        "0xFF6D27"
)

var darkSquigglyBracketsColors = arrayOf(
        "0x1976D2",
        "0x8BC34A",
        "0xFF9863"
)

var lightAngleBracketsColor = lightRoundBracketsColors
var darkAngleBracketsColor = darkRoundBracketsColors

HTML code in js

To enable rainbow brackets for HTML in js code like this:

var html = '<div><div><div>Hello</div></div></div>';

This plugin will automatically override color scheme "HTML_CODE" cause our rainbow color been covered by intellij built-in functionality. You still could set <option name="rainbowifyHTMLInsideJS" value="true" /> in config file to disable just like Config brackets colors.

Contribute

  • gradle test
  • gradle runIde
  • gradle buildPlugin

Acknowledgements

Intellij-rainbow-brackets is heavily inspired by Rainbow Brackets for Visual Studio Code

About

Rainbow Brackets / Rainbow Parentheses for IntelliJ IDEA based IDEs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 100.0%