mirror of
https://github.com/chylex/IntelliJ-Rainbow-Brackets.git
synced 2025-01-10 04:42:46 +01:00
3.3 KiB
3.3 KiB
Rainbow Brackets
Rainbow Brackets / Rainbow Parentheses for IntelliJ IDEA-based IDEs
Compatible with
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 ...
This plugin is also compatible with material-theme-jetbrains-eap
Screenshots
- with material-theme-jetbrains-eap
- with scala
- with kotlin
- with HTML/XML
- and more...
Install
https://plugins.jetbrains.com/plugin/10080-rainbow-brackets
Implement for some language you would like
- Check this commit
- Found the language ID such as
Scala
- Implement
RainbowScala
which is a class implementAnnotator
, you should know theTokenTypes
of your language, such as ScalaTokenTypes. And find out themyDebugName
of yourIElementType
, in scala, we have:
IElementType | bracket | myDebugName |
---|---|---|
tLSQBRACKET | [ | [ |
tRSQBRACKET | ] | ] |
tLBRACE | { | { |
tRBRACE | } | } |
tLPARENTHESIS | ( | ( |
tRPARENTHESIS | ) | ) |
tLESS | < | < |
tGREATER | > | > |
So you could use myDebugName
as parameter pass to annotateUtil
- Add your language id to
specLangList
so we can ignore common annotator. - Remove old annotator implement in
plugin.xml
and add your new ! gradle runIde
check your awesome work !- Sent PR.
Contribute
gradle runIde
gradle buildPlugin
Acknowledgements
Intellij-rainbow-brackets is heavily inspired by intellij-rainbow and Rainbow Brackets for Visual Studio Code