Skip to content

Conversation

@svanharmelen
Copy link
Collaborator

Three small tweaks to make the look and feel of this theme consistent with the Monokai theme available for Sublime.

Three small tweaks to make the look and feel of this theme consistent
with the Monokai theme available for Sublime.
@asantos3
Copy link

asantos3 commented Apr 4, 2015

.keyword.operator fixes curly braces and punctuation in go but what does the other two tweaks do?

@kevinsawicki
Copy link
Owner

@svanharmelen thanks for these, would you mind throwing up a screenshot that summarizes the changes?

@svanharmelen
Copy link
Collaborator Author

Please see the below screenshots for the changes made by this PR...

Previous colors:
image

Updated colors:
image

Please notice the:

  • The name of a func in the func declaration now has a separate color making it stand out more
  • The brackets/punctuation is now in plain white
  • The escaped values in a string are now clearly shown by a different color as the rest of the string

Besides that I personally believe these changes make the theme much more readable and clear, the changes are also in line with how the Monokai theme looks in Sublime.

@svanharmelen
Copy link
Collaborator Author

@kevinsawicki any feedback on this one? Are you OK with the changes or do you need/want to discuss anything first? If so just let me know your concerns... Thx!

kevinsawicki added a commit that referenced this pull request Apr 10, 2015
@kevinsawicki kevinsawicki merged commit 0c2b1cc into kevinsawicki:master Apr 10, 2015
@kevinsawicki
Copy link
Owner

Looks good, thanks for the screenshots 🚢

@svanharmelen
Copy link
Collaborator Author

Nice, thx...

@svanharmelen svanharmelen deleted the f-small-tweaks branch April 15, 2015 16:02
@Victorystick
Copy link

Having done work on the brackets in atom/language-go#52, some of these changes are basically hacks to fix the syntax highlighting of the odd scopes that the Go grammar generated at the time.

In atom/language-go#32, two syntax themes which have been tweaked especially for Go are presented as a solution, rather than suggesting to fix the arguably buggy grammar.

As you can see in the example I supplied in the PR, I had the same issue of miscolored brackets in my theme. The issue was addressed by aligning language-go's behavior with other languages, like C and JavaScript.

Similarly, function declarations in those languages give the function name the scope entity.name.function, which results in the expected highlighting. Where as the current Go apparently yields support.function.decl.

I propose changing support.function.decl to entity.name.function, which will make more themes work just as well as this one with Go.

@svanharmelen
Copy link
Collaborator Author

Sounds like a plan... Allow me to update that one and at the same time cleanup some of the tweaks in this package as well, making stuff a little more generic again.

Thanks for pointing it out!

@Victorystick
Copy link

@svanharmelen You're fast! Nice of you to fix it!

Regarding the third and final change, that of string escapes, Go targets the constant.escape.format-verb scope where as JavaScript and C use constant.character.escape. Syntax themes such as Atom One Dark/Light only target the latter. Extending the scope to include character (such as constant.character.escape.format-verb) would enable Atom's default syntax to highlight all three tweaks without a problem.

Having made this final change would, for better or worse, make the changes of this PR superfluous. Since I know you care about Go's highlighting as much as I do, I hope you won't take offence.

@svanharmelen
Copy link
Collaborator Author

@Victorystick again sounds good 😉 I would suggest to just let it be constant.character.escape in that case. The format-verb doesn't add much I think...

Are there any more improvements your aware of? Then I'll bundle them for a next release.

Thanks for helping to make language-go more robust and inline with the other languages packages!

@Victorystick
Copy link

I agree with you. Keep it simple.

I don't have access to a computer, otherwise I would have made a PR myself. I'll take another look when I do.

Nice working with you, as always! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants