C/C++/Perl operator color


Hello all,

How to change the color of the operators for every language available for atom ?
For the moment, I’ve done the following thing:

&.operator {
        color: @brown;

It works well for python and css, but, the coloration is inexistant for some other languages (C/C++ and Perl for example).

Is there a way to solve that ?
Thank you in advance for your answers.


There isn’t a globally-recognized standard for the various parts of a grammar, unfortunately. So you’ll have to address these one-off things by looking at the scopes assigned to the ones that don’t get caught by your method and enhancing it as you find them.

I just took a look at the C grammar by using this test file:

int main() {
    int foo = bar + baz;

Neither the = nor the + are marked as operators by the grammar when I use Alt+Cmd+P to reveal the scopes, so it may be that the grammar itself needs to be enhanced in that case.


Well, thank you for your answer.