Ruby Syntax highlight issue
-
Hy,
I’m trying to use NPP to learn Ruby, because I feel comfortable to it, but I noticed the syntax highlight is a bit weird, limited. For example, it will give same color to a function name as to its argument, or when I call a class method, the class and the method have the same color and even the boolean (true/false) are the same color as other operators (def, end, return, etc).
I don’t think this is the “right” syntax highlight, as I texted it in other editors (I even attached here a screenshot from Atom), so maybe it would worth investigating to see why it happens like this. Maybe the SciLexer.dll doesn’t address Ruby syntax in the proper way (is incomplete?)attached imgur link that shows the example: http://imgur.com/a/r5jya
Thank you very much.
-
NPP is based on Scintilla. Almost all syntax highlighting lexers come from there.
In addition, sadly, latest Scintilla is seldom merged into NPP.So:
- Try SciTE editor to see if ruby lexer has been improved lately.
- If not, find out author of Ruby lexer within Scintilla community and ask politely for improvements.
- Stand in line in NPP community and ask for merge with latest Scintilla.
Alternatively, lexers can be added as plugins. But this is rather hard work. One can either write a lexer plugin from scratch or package existing scintilla lexer as plugin.Or just use ATOM.
-
@gstavi I brought this into attention of the Ruby Lexer dev within Scintilla. Hopefully it will be corrected.
Thanks for the suggestions.