-
Notifications
You must be signed in to change notification settings - Fork 17.3k
Implement naming conventions in default themes #20524
Conversation
|
Here are some previews of the improvements brought by this PR. For each theme, notice the differences before and after implementing the naming conventions. Syntax highlighting is really harmonized across languages. Python: class Lilac(Tree):
flowers: bool
def bloom(self, days: int) -> float:
self.flowers = True
return float(days) / 7
if __name__ == "__main__":
season: Final[str] = "winter \n"
lilac: Lilac = None
if season[0] == 'w' and lilac == None:
snow = "*"C++: class Lilac: public Tree {
bool flowers;
float bloom(int days) {
this->flowers = true;
return (float) days / 7;
}
};
int main() {
const char *season = "winter \n";
Lilac *lilac = nullptr;
if (season[0] == 'w' && lilac == nullptr) {
auto snow = "*";
}
}Go: type Lilac struct {
Tree
flowers bool
}
func (lilac Lilac) bloom(days int) float32 {
lilac.flowers = true
return float32(days) / 7
}
func main() {
const season string = "winter \n"
var lilac *Lilac = nil
if season[0] == 'w' && lilac == nil {
snow := "*"
}
} |
579960c to
8ad03cf
Compare
|
@chbk I am so glad to see this PR. 🚀 |
d4f11f3 to
93caf86
Compare
sadick254
left a comment
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.
|
Thanks @sadick254, it's great to see this merged! |
|
Hi, after the last update the '$' symbol in a php file when the One Dark syntax theme are select is white and not red. To temporaney solve the problem i have add @KapitanOczywisty suggested the change this file https://github.com/atom/atom/blob/master/packages/one-dark-syntax/styles/syntax-legacy/php.less add a specific rules fort this case. If this is the problem I can try to do a PR on that file to fix it Thanks |
|
Hi @ElderTugBoat786, thanks for pointing that out. The purpose of this PR (and related PRs) is to harmonize syntax highlighting across languages, so the color change is an intended consequence. Punctuation marks should be white with the One Dark theme. Variables in PHP should be white as well, like in other languages. Eventually they will be when the legacy stylesheets are retired, but I don't know what the maintainers' plans are with the naming conventions. |
|
This is not the only thing that changed. now when you double click a variable, it highlights the name with the $. Yesterday, it only highlighted the text part of the variable name, which was really really useful. |
|
@curtiscarlson Theme is not responsible for that. There was mentioned issue, but it was initially fixed in #21910 . However after that it was introduced directly: atom/language-php#412 and merged without any discussion. You can fix that of course by editing language-php options, but this is still annoying how they are merging dumb stuff like that. |
|
Can't you configure it? |
|
@ThatXliner Yes, you can change it. My problem is that they changed default configuration based on some issue with 3-rd party extension, which is crazy. |
Based on atom/atom#20524. Keeping the "legacy" definitions is useful while the language grammars have not been fully merged in.
Based on atom/atom#20524. Keeping the "legacy" definitions is useful while the language grammars have not been fully merged in.
Based on atom/atom#20524. Keeping the "legacy" definitions is useful while the language grammars have not been fully merged in.
Based on atom/atom#20524. Keeping the "legacy" definitions is useful while the language grammars have not been fully merged in.









Description of the Change
This is an update of the default syntax themes to implement naming conventions for syntax scopes.
This PR simply adds the template to each theme with custom colors, to accommodate the naming conventions. There should be no break in compatibility with existing grammars.
As naming conventions are implemented in more language grammars, their old specific stylesheets can be retired.
Possible Drawbacks
Some colors are changed to stay consistent between languages and to follow the design guidelines by @maxbrunsfeld regarding color choices.
Verification Process
Release Notes
Applicable Issues
Related Pull Requests