-
Notifications
You must be signed in to change notification settings - Fork 295
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
Improve compatibility with default/other syntax themes #83
Conversation
Work in progress version of this file is part of `minimal-syntax` and will be synced upstream when the time is right
Since this actually handles reference links nicely, I'm working on patching my theme/port of Tubster, I find it helps to actually include the new markdown.less file in base. |
And I've got my theme up and running with language-markdown, but thanks to an renaming issue, it won't be available as an update until it gets fixed. |
Hi @plttn, The Cool that you're updating |
Hi @burodepeper and @plttn, |
I can now officially say my theme pubster-syntax just hit v1, with the headlining feature of v1 being Thanks to @burodepeper for making a IMO much better markdown grammar than the core one. |
Hi @MaximSokolov (and others), I found a PR of yours a while ago (you recently linked me to this but I remember a much longer discussion) about standardizing scope-names. I found it an interesting topic/issue, wanted to get involved with it initially, but got side-tracked. While working on My efforts on this front have been a little stale the last couple of weeks. I got demotivated by the potential scale of trying to really fix the issue at hand, but I believe that a few like-minded people could actually get some stuff realized! If any of you are interested, I'd like to suggest coming up with a roadmap to tackle the issue first only for markup-related scope names before escalating it to an Atom-wide issue/solution. My efforts so far have resulted in this less-template (section 2 is most relevant). From that I suggest the following plan:
Parallel to this, I will be adapting I hope I've sparked some interest, and if similar efforts are happening elsewhere, links please! |
@MaximSokolov suggested to add an official syntax naming convention to Atom: atom/atom#8430 and the WIP: atom/flight-manual.atom.io#114. I think it's a great idea, but since there are already hundreds of syntax themes and language packages out there, not easy to change too much. So that PR is more about thinking how it could work for Atom @burodepeper Something I was wondering. How much different is this PR from the + .md,
.gfm {
// styles
} |
@simurai I had already noticed that both those issues you've linked haven't been updated for months. Mentioning you and Maxim here is an (possibly futile/unneccessary) attempt to jump-start it again. In general, I think the this PR is not about the difference between this package and Perhaps most importantly, I'm trying to figure this out without breaking any backwards compatibility. Removing the I don't mind doing some heavy lifting, and seeing as there are a little over a thousand syntax-themes currently, I'd even say that it is realistic to suggest changes or perhaps even create PRs for the most-used themes. I'd even dare to say that it is realistic to do this not just limited to markup-related scopes. It needs some coordination, but it's do-able, right? We're talking about creating a template, and a way to distribute it. Or am I completely overlooking something? Again, I don't mind doing some heavy lifting, but it would be nice to have some support beforehand, a few extra braincells to think about things that ought to stand the test of time (with @MaximSokolov's work as a good start), and eventually some help of the Atom team when it comes to communication/distribution. |
Sorry, yeah right..
With "fallback", do you mean this? It's pretty close to the template currently used for the syntax theme generator and I think also TextMate converter. So the basics should be ok in most themes. But I just looked at a random (newest) syntax theme and it's scoped to - .gfm {
.markup {
// styles
}
- } wouldn't be too hard and the theme author will most likely happily accept it. But if we define a completely new template and try to convince theme authors to use it, I can imagine it's a much harder sell. Also, some themes are probably abandoned and the theme author wouldn't care about getting PRs. Not saying we couldn't improve the current convention already now, and it would be opt-in for those themes that want to use it... just that trying to enforce it, would really need some heavy lifting and hope theme authors play along. |
Sorry if off topic, but somehow I still think that moving the (some of the) styling into language packages might be a good idea. So..
Benefits:
Actually, the https://atom.io/packages/angularjs already tried to do it here, but there aren't any fitting variables to use, see this issue. The hard part will be to define the variables that make sense for most language packages. |
The fallback is in the actual parsing/scopes assigned. This for example is created in side a As an approach of moving styles out of the I agree that suggesting/enforcing a change of structure isn't the way to go, but I think it would be good for the default themes to implement it, so everything that is forked off of them can take advantage of it. The template you reference is a good start, but I have a feeling that a lot of new themes aren't forked off of that one. If we think of this as a disease we want to spread, we need multiple patient zeroes ; ) Seeing as you are more involved with Atom, do you think it's possible to compile a list of most used syntax-themes by actual usage? It would be good to know the scale of the problem, and how long its tail is (as in "The Long Tail"). Yup, my approach with markup-and-down.less is indeed an intermediary form of what you suggest. But as much as I'd like to discuss that, I think a different place would better suit the discussion. |
My first instincts were that this would indeed be the hard part, but now I think of it again, I think it is actually quite simple. It seems hard, because there's is no apparent overlap between for example html, javascript and css. But if you group languages by type, things become more apparent. Think of the following groups for example:
The concept of a Let's get back on-topic ; ) |
Speaking of test-cases: I created this PR (kevinsawicki/monokai#68) for the Monokai theme by @kevinsawicki, but it hasn't gotten any attention yet so far. I'm sure Kevin has other things on his mind, and I don't blame him in the slightest (although this is intended as a slight nudge ;), but this could be a good indicator of what we would be working 'against'. On the other side of the spectrum, I would imagine that authors of lesser used themes would be extra motivated by outside interest. |
I'm closing/abandoning this attempt. See #52 for some additional details. |
source.text.md
markup-and-down.less
resource file to enable quick and easy patching of syntax-themesminimal-syntax
, and add scopes wherever necessarymarkdown-preview
doesn't work with the changed base scope; perhaps this can better be solved in that package. (see Idea: improve/change grammar matching atom/markdown-preview#384)