Friday, May 05, 2006

IntelliJ Ruby Syntax Highlighting Plugin

I'm very happy to see that the previous hack I detailed for IntelliJ is no longer necessary.

Following my post (a few days later) I got this comment:
Quick follow-up: I spent quite a few evenings working on a generic highlighter (with basic Ruby highlighting as the example config). You may want to have a look here.

Cheers, Daniel

My initial impression was not very good. Then I realized that few options in Colors & Fonts (CTRL + ALT + S, F) were set by default. I made a few quick changes to the color scheme that I prefer and was quite pleased.

Also, I made a few changes in the config to add some extra support:

In simplesyntax_ruby.config I added:
regex SYMBOLS => :[a-z][A-Za-z0-9_]+
descriptions[ SYMBOLS ] = Symbols

This change supports highlighting symbols.

I also modified the tags\keywords.rb file change my keyword array to be:
KEYWORDS = ["alias", "and", "BEGIN", "begin", "break", "case", "class", "def", "defined", "do", "else", "elsif", "END", "end", "ensure", "false", "for", "if",
"in", "module", "next", "nil", "not", "or", "redo", "rescue", "retry", "return", "self", "super", "then", "true", "undef", "unless", "until", "when",
"while", "yield"]


Overall, super job Daniel.
Post a Comment