Operators aren't highlighted
Victorystick opened this issue · comments
Operators are highlighted:
https://github.com/atom/one-dark-syntax/blob/master/styles/language.less#L26-L28
But they are colored the same as default text:
https://github.com/atom/one-dark-syntax/blob/master/styles/colors.less#L13-L14
I can't speak as to whether it is intended behavior or not.
Is this intended behaviour?
Yes, that's intended. Well, this theme is based on base16-tomorrow
where the same question came up: atom/base16-tomorrow-dark-theme#13
I think there it should stay true to the original theme and not have a different color for operators. Just because the name makes people expect it to be the same.
Now if One dark should start "its own life" is another question.
Now if One dark should start "its own life" is another question.
'course it should—it's the default theme for a rather popular text editor, unlike Tomorrow Dark :-]
So this question came up again in atom/language-javascript#273 and atom/language-javascript#274.
Here the before/after if operator
s have the same color as other keyword
s:
function add ( x, y ) {
if ( typeof x != 'number' || typeof y !== 'number') {
throw new TypeError('Can only add numbers!');
}
return x + y;
}
function destoryCompleted() {
for (var id in _todos) {
var a = {};
a.foo = 'bar';
delete a.foo;
Before:
After:
Hmm.. I usually prefer not to colorize too much just so that not everything asks for attention.
Anyone strongly thinks it should be the new default? Here you can try it out how it feels in styles.less
with One dark:
.theme-one-dark-syntax atom-text-editor::shadow {
.keyword.operator.js {
color: #c678dd;
}
}