Support for properties, function/method calls #242
Conversation
I've been pretty busy but I'll try to review this as soon as possible 😄. |
+1 |
'include': '#properties' | ||
} | ||
{ | ||
'match': '(?x) \\b[a-zA-Z_$]\\w* (?= \\s*, | \\) )' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really see the benefit of using (?x)
here since the regex is pretty simple. Same goes for below.
👍 Looks good for the most part! |
Also syntax themes should be updated probably: .meta.method-call, .meta.function-call {
& > .entity.name.function {
color: @syntax-text-color;
}
} or // Highlight function name only in function declaration
.meta.function {
.entity.name.function {
color: @color;
}
} /cc @simurai |
This will probably warrant spec changes in Atom core - it did last time at least. I'll just wait for simurai and then merge and create a PR. |
Conflicts: spec/javascript-spec.coffee
Tested with https://github.com/atom/language-examples/blob/master/languages/javascript.js .meta.method-call, .meta.function-call {
.entity.name.function {
color: @syntax-text-color;
}
} // Highlight function name only in function declaration
.meta.function {
.entity.name.function {
color: @hue-6-2;
}
} Doesn't it make more sense to keep the function name and function call the same color? Basically without changing the themes. Also, should it be scoped to JavaScript only? If not, I think option 2 would also affect other languages, like |
Support for properties, function/method calls
👏 🎉 |
Adds support for properties, function calls, method calls.
Fixes #37, fixes #241
Replaces: closes #217, closes #146
Refs #137