Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choice of scope #20

Closed
idleberg opened this issue Sep 7, 2015 · 5 comments · Fixed by #41
Closed

Choice of scope #20

idleberg opened this issue Sep 7, 2015 · 5 comments · Fixed by #41

Comments

@idleberg
Copy link
Contributor

idleberg commented Sep 7, 2015

I was wondering what made you choose .gfm.restructuredtext as scope name. If reStructuredText was GFM-based (GitHub Flavoured Markdown), the natural choice would be .source.gfm.restructuredtext. Since it isn't, I'd suggest using .text.restructuredtext instead (maybe .source.restructuredtext). Your scope name works, it's just that it seems an odd choice.

See this comparison of Sublime Text and Atom scopes

@Lukasa
Copy link
Owner

Lukasa commented Sep 7, 2015

We did it to pretend to be GFM, as seen here. I'm open to changing the scope: would you like to open a PR?

@idleberg
Copy link
Contributor Author

idleberg commented Sep 7, 2015

I don't really understand @hbrls arguments for using .gfm.restructuredtext.John Gruber isn't planning any updates on Markdown and it looks like the future will be the CommonMark implementation. Anyway, I don't think there's a real chance of Markdown adapting rst-Syntax, since IMHO the latter isn't anywhere as readable as Markdown. Hence, I don't think .source.gfm.restructuredtext is a good choice.

Well, personally I'd stick with what TextMate/Sublime Text use right now, Atom has adopted most of its scopes from there. If that's alright with you, I will submit a PR for text.restructuredtext.

Personally, I don't even use reStructuredText, but I have an Atom package that supports it.

@hbrls
Copy link
Contributor

hbrls commented Sep 8, 2015

@idleberg It's because most themes support GFM, not rst. It's a hack.

@Lukasa
Copy link
Owner

Lukasa commented Sep 8, 2015

Correct: the goal is to get better theme highlighting.

@Alhadis Alhadis mentioned this issue Jun 3, 2016
@Alhadis
Copy link
Collaborator

Alhadis commented Jun 3, 2016

No, Idleberg's right. It needs to be specific: scope-names are used for a variety of things across Atom's APIs, not just styling. For instance, snippets, shortcuts/commands, autocomplete, and numerous other things can be tailored to affect certain languages only by reading their scopes.

Furthermore, themes shouldn't be targeting specific languages for colours, but the scope names recommended by TextMate's authoring guidelines. If this breaks a theme's styling, it's a sign of poor authorship.

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 a pull request may close this issue.

4 participants