More flexible coloration configuration to allow scala internal DSL

Hi,

I'm developping a new language based on scala internal DSL to allow the user to describe digital hardware. Now i'm trying to have a nice coloration of new keywords introducted by it, but i can't / don't know how. (or i have miss something)

There is some example of this scala internal DSL into https://github.com/SpinalHDL/SpinalHDL/blob/master/README.md.
As you can see it would be nice to have coloration on following keywords : when switch is UInt Bits SInt Bool ...

I think one nice way to do that is to have the possibility into the      intelij/setings/editor/colors & fonts/scala      to specify some custom keywords. Do you think it's a possible future update ?

Do you know if there is a solution that is already possible ?

Thanks for reading

Best Regards

1 comment
Comment actions Permalink

What about creating custom plugin to IntelliJ IDEA, which will support custom things for your language including colors & fonts?
You can add as pull request extension to org.jetbrains.plugins.scala.highlighter.AnnotatorHighlighter (from Scala plugin sources), where custom plugin will be able to add custom code for colors and fonts.

I have no idea now about proper other simpler solution, but this solution doesn't look hard to implement and it looks quite flexible.

Best regards,
Alexander Podkhlayuzin.

0

Please sign in to leave a comment.