Language-elixir treats underscore "_" as a comment... how to override?


#1

I am using language-elixir package and have encountered with the next issue.

The underscore _ or the word, starting with underscore _word seems to be treated by the package as a comment. And consequently highlighted accordingly. This is very unhandy.

Some code for example. Look at the line 58.

The same code in SublimeText is Ok. The _split highlighted as a regular code.
If it is only underscore, but not the word, starting with it, it looks even worse. You just can not see it.

And the underscored words in other languages are Ok. (I’v checked JS and Ruby)

So, the question is: “How can I override this behavior?”


#2

UPD

Looking for some way to solve the problem I’ve found this issue on the package Github page.

Following the comments I just went to the /.atom/pacages/language-elixir/grammars/elixir.cson and commented the line 'match': '\\b_(\\w*)' (in the #Comments section).

Since I don’t worry of seeing “unused variables” which (I presume) are the only target of this match the case is closed :slight_smile: