Lukasa / language-restructuredtext

A ReStructuredText syntax package for Atom
MIT License
27 stars 15 forks source link

Choice of scope #20

Closed idleberg closed 8 years ago

idleberg commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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

Lukasa commented 9 years ago

Correct: the goal is to get better theme highlighting.

Alhadis commented 8 years ago

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.