GithubHelp home page GithubHelp logo

davidmr001 / intellij-rainbow-brackets Goto Github PK

View Code? Open in Web Editor NEW

This project forked from izhangzhihao/intellij-rainbow-brackets

0.0 1.0 0.0 1.1 MB

Rainbow Brackets / Rainbow Parentheses for IntelliJ based IDEs

Home Page: https://plugins.jetbrains.com/plugin/10080-rainbow-brackets

License: Apache License 2.0

Kotlin 100.00%

intellij-rainbow-brackets's Introduction

Intellij rainbow brackets

Rainbow Brackets / Rainbow Parentheses for IntelliJ based IDEs.


Table of Contents

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, HTML, XML, SQL, Apex language ...

Screenshots

  • with Java

  • with Scala

  • with Clojure

  • with Kotlin

  • with HTML/XML

  • Scope highlighting

Ctrl + Button3(Windows & Linux) or Meta+ Button3(Mac):

Alt + Button3:

  • looking forward to your screenshots(PR welcome!)

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

Customize colors

If you want to customize colors, edit your config file and restart your IDE(APP_CONFIG/rainbow_brackets.xml), In my env(MAC os) is /Users/izhangzhihao/Library/Preferences/IntelliJIdea2018.2/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!

Default colors

HTML code in js

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

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

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

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 color scheme propertie "KOTLIN_FUNCTION_LITERAL_BRACES_AND_ARROW" cause our rainbow color been covered by kotlin plugin built-in functionality. You still could set <option name="rainbowifyKotlinFunctionLiteralBracesAndArrow" value="false" /> 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

intellij-rainbow-brackets's People

Contributors

codacy-badger avatar gitter-badger avatar izhangzhihao avatar onisuly avatar yiiguxing avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.