IntelliJ IDEA, PhpStorm, WebStorm, PyCharm, RubyMine, AppCode, CLion, Gogland, DataGrip, Rider, MPS, Android Studio
Java, Scala, Clojure, Kotlin, Python, Haskell, Agda, Rust, JavaScript, TypeScript, Erlang, Go, Groovy, Ruby, Elixir, ObjectiveC, PHP, C#, HTML, XML, SQL, Apex language ...
- with material-theme-jetbrains-eap
- with scala
- with kotlin
- with HTML/XML
- and more...
https://plugins.jetbrains.com/plugin/10080-rainbow-brackets
- Check this commit for implementation for scala or check out this commit for implementation for javascript.
- 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.
gradle runIde
gradle buildPlugin
Intellij-rainbow-brackets is heavily inspired by intellij-rainbow and Rainbow Brackets for Visual Studio Code