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

Add more language support #2

Merged
merged 51 commits into from Apr 15, 2015

Conversation

Projects
None yet
2 participants
@braver
Contributor

braver commented Mar 26, 2015

This is going to take some work. I might even abandon this and try again later. I'll run back through my commits and do some before and after screenshots, but for some language features it's hard to do it right without changing the base a bit. Or as I said I'm seeing it wrong and I need to try again.

For now though, the checklist in no particular order:

  • SCSS
  • SASS
  • Stylus
  • Twig (works a treat as is, really highlights the structure of the code)
  • Smarty (no changes needed, mostly limited by the limited grammar)
  • PHP
  • Perl
  • Python
  • Java
  • Javascript
  • C
  • JSON
  • YAML
  • XML
  • HAML
  • Go
  • Haskell
  • Shell
  • LaTex
  • MediaWiki
  • ...
// Comments -----------------------------------

This comment has been minimized.

@braver

braver Mar 26, 2015

Contributor

comments were being overruled in some cases so I moved this down

@braver

braver Mar 26, 2015

Contributor

comments were being overruled in some cases so I moved this down

@braver

This comment has been minimized.

Show comment
Hide comment
@braver

braver Mar 26, 2015

Contributor

Also, about the separate small files, I'm not seeing a performance hit. The themes files are compiled and cached and those caches probably aren't refreshed very often. So I think it's fine to split them up in really small files.

Contributor

braver commented Mar 26, 2015

Also, about the separate small files, I'm not seeing a performance hit. The themes files are compiled and cached and those caches probably aren't refreshed very often. So I think it's fine to split them up in really small files.

@braver

View changes

Show outdated Hide outdated styles/languages/_base.less
.uno-1;
}
.variable,
.character.escape,

This comment has been minimized.

@braver

braver Mar 27, 2015

Contributor

helps with grokking regexes

screen shot 2015-03-27 at 20 08 47

@braver

braver Mar 27, 2015

Contributor

helps with grokking regexes

screen shot 2015-03-27 at 20 08 47

@simurai

This comment has been minimized.

Show comment
Hide comment
@simurai

simurai Mar 28, 2015

Owner

Wow.. that's a long list of languages. Do you know them all?

Feel free to move the base stuff around. It made sense initially for HTML, CSS, Less.. but maybe not for the rest.

Owner

simurai commented Mar 28, 2015

Wow.. that's a long list of languages. Do you know them all?

Feel free to move the base stuff around. It made sense initially for HTML, CSS, Less.. but maybe not for the rest.

@braver

This comment has been minimized.

Show comment
Hide comment
@braver

braver Mar 28, 2015

Contributor

No, sadly I don't know them all (I get to about 12 of that list). But I've been doing syntax themes for Sublime for years, so I have some notion of what to look for. And it's usually the grammar definitions that are the limiting factor anyway.

Contributor

braver commented Mar 28, 2015

No, sadly I don't know them all (I get to about 12 of that list). But I've been doing syntax themes for Sublime for years, so I have some notion of what to look for. And it's usually the grammar definitions that are the limiting factor anyway.

@braver

This comment has been minimized.

Show comment
Hide comment
@braver

braver Mar 30, 2015

Contributor

@simurai With regards to LESS/CSS/SCSS, you're now making all selectors white. I'm wondering:

  1. We could subdue tags a bit so classes stand out more. That would give some structure to the selectors.
  2. We could differentiate mixins from regular selectors.

I'm not 100% sure either way, I really like the basic simplicity of the theme as is. What do you think?

Contributor

braver commented Mar 30, 2015

@simurai With regards to LESS/CSS/SCSS, you're now making all selectors white. I'm wondering:

  1. We could subdue tags a bit so classes stand out more. That would give some structure to the selectors.
  2. We could differentiate mixins from regular selectors.

I'm not 100% sure either way, I really like the basic simplicity of the theme as is. What do you think?

@simurai

This comment has been minimized.

Show comment
Hide comment
@simurai

simurai Mar 31, 2015

Owner
  1. Hmm.. I also like its simplicity and not sure if having a different color between tags vs classes is necessarily better.
  2. Yeah, that might be a good idea. Mostly because in Less the mixins look like selectors and makes it confusing and harder to find. Not sure what color though.. currently there are just 4 levels of purple. "white" being just a very bright purple. So it might could be an "almost white"?

btw. the duo-3 color isn't used anywhere.. I just added it to have 4 colors for each. Maybe we can remove it for now and just add it if we really need a 4th duo color.

Owner

simurai commented Mar 31, 2015

  1. Hmm.. I also like its simplicity and not sure if having a different color between tags vs classes is necessarily better.
  2. Yeah, that might be a good idea. Mostly because in Less the mixins look like selectors and makes it confusing and harder to find. Not sure what color though.. currently there are just 4 levels of purple. "white" being just a very bright purple. So it might could be an "almost white"?

btw. the duo-3 color isn't used anywhere.. I just added it to have 4 colors for each. Maybe we can remove it for now and just add it if we really need a 4th duo color.

@braver

This comment has been minimized.

Show comment
Hide comment
@braver

braver Mar 31, 2015

Contributor

Hmm.. I also like its simplicity and not sure if having a different color between tags vs classes is necessarily better.

Agreed

Yeah, that might be a good idea. Mostly because in Less the mixins look like selectors and makes it confusing and harder to find.

I've definitely had to look twice a few times because of that. I'll look into it and try to pick a color that makes sense.

btw. the duo-3 color isn't used anywhere.. I just added it to have 4 colors for each. Maybe we can remove it for now and just add it if we really need a 4th duo color.

Yeah, I noticed. If I haven't found a use for it by the end of the week it's going out 😉

Contributor

braver commented Mar 31, 2015

Hmm.. I also like its simplicity and not sure if having a different color between tags vs classes is necessarily better.

Agreed

Yeah, that might be a good idea. Mostly because in Less the mixins look like selectors and makes it confusing and harder to find.

I've definitely had to look twice a few times because of that. I'll look into it and try to pick a color that makes sense.

btw. the duo-3 color isn't used anywhere.. I just added it to have 4 colors for each. Maybe we can remove it for now and just add it if we really need a 4th duo color.

Yeah, I noticed. If I haven't found a use for it by the end of the week it's going out 😉

simurai and others added some commits Mar 31, 2015

Update JSON
Have property vs values similar to less/css
@braver

This comment has been minimized.

Show comment
Hide comment
@braver

braver Mar 31, 2015

Contributor

uno-2 seems like the subtle option. Gets a bit lots in a sea of variables depending on what your stylesheet looks like. Not sure if that's a problem, at least it doesn't look like a selector.
screen shot 2015-03-31 at 23 35 50

I like it with duo-2 too though. This is otherwise only used for units, so mixins really stand out. And I like that because usually a mixin is actually kinda special.
screen shot 2015-03-31 at 23 36 14

What do you think?

Contributor

braver commented Mar 31, 2015

uno-2 seems like the subtle option. Gets a bit lots in a sea of variables depending on what your stylesheet looks like. Not sure if that's a problem, at least it doesn't look like a selector.
screen shot 2015-03-31 at 23 35 50

I like it with duo-2 too though. This is otherwise only used for units, so mixins really stand out. And I like that because usually a mixin is actually kinda special.
screen shot 2015-03-31 at 23 36 14

What do you think?

@simurai

This comment has been minimized.

Show comment
Hide comment
@simurai

simurai Mar 31, 2015

Owner

I agree on using duo-2 for mixins. yeah, uno-2 get's lost a bit.. and adding a 5th uno color (uno-1.5) might be too hard to tell them apart.

Owner

simurai commented Mar 31, 2015

I agree on using duo-2 for mixins. yeah, uno-2 get's lost a bit.. and adding a 5th uno color (uno-1.5) might be too hard to tell them apart.

@braver

This comment has been minimized.

Show comment
Hide comment
@braver

braver Apr 4, 2015

Contributor

Done deal

Contributor

braver commented Apr 4, 2015

Done deal

@simurai

This comment has been minimized.

Show comment
Hide comment
@simurai

simurai Apr 5, 2015

Owner

Ok, duo-3 has to go.. 😬 I played around with a logo and 7 shades work perfectly:

duotone-dark 1x

Owner

simurai commented Apr 5, 2015

Ok, duo-3 has to go.. 😬 I played around with a logo and 7 shades work perfectly:

duotone-dark 1x

@simurai

This comment has been minimized.

Show comment
Hide comment
@simurai

simurai Apr 5, 2015

Owner

Ooops.. I guess updating the README broke the auto-merge.

Owner

simurai commented Apr 5, 2015

Ooops.. I guess updating the README broke the auto-merge.

@braver

This comment has been minimized.

Show comment
Hide comment
@braver

braver Apr 5, 2015

Contributor

That logo is so cool!

Contributor

braver commented Apr 5, 2015

That logo is so cool!

@braver

This comment has been minimized.

Show comment
Hide comment
@braver

braver Apr 13, 2015

Contributor

I'm actually pretty happy with this in its current state, for the language I have to live with daily. What's still a "problem" though is that we default to uno-4 for source. That means that for very limited language packages like that for javascript or shell scripts, a lot of text is very subdued. I now resolve that per language by going to uno-2. Which is a bit inelegant. Other syntax themes don't tend to deal with lacking grammars any more gracefully though.

Contributor

braver commented Apr 13, 2015

I'm actually pretty happy with this in its current state, for the language I have to live with daily. What's still a "problem" though is that we default to uno-4 for source. That means that for very limited language packages like that for javascript or shell scripts, a lot of text is very subdued. I now resolve that per language by going to uno-2. Which is a bit inelegant. Other syntax themes don't tend to deal with lacking grammars any more gracefully though.

@braver

This comment has been minimized.

Show comment
Hide comment
@braver

braver Apr 13, 2015

Contributor

@simurai I checked everything off, checking mostly if it looks ok without adding too much detail/complexity. Would love to get your feedback on this and see if there's anything left to tweak before merging this.

Contributor

braver commented Apr 13, 2015

@simurai I checked everything off, checking mostly if it looks ok without adding too much detail/complexity. Would love to get your feedback on this and see if there's anything left to tweak before merging this.

@simurai

This comment has been minimized.

Show comment
Hide comment
@simurai

simurai Apr 15, 2015

Owner

Awesome! Yeah, let's merge it. Looks good for the languages that I use too.

Right, uno-4 for source is a bit unfortunate. There is no way around it unless updating the grammars to add extra selectors, right?

Maybe an option would be to do:

@syntax-text: @uno-2; // colors.less

// _base.less
.meta {
  .uno-4();
}

So the default text color (for any unknown language) is uno-2 and then for the languages that we support/control add the uno-4 back.

.css {
  &.source {
    .uno-4();
  }
}

Would have higher specificity which might messes up some stuff. Would have to try.

Owner

simurai commented Apr 15, 2015

Awesome! Yeah, let's merge it. Looks good for the languages that I use too.

Right, uno-4 for source is a bit unfortunate. There is no way around it unless updating the grammars to add extra selectors, right?

Maybe an option would be to do:

@syntax-text: @uno-2; // colors.less

// _base.less
.meta {
  .uno-4();
}

So the default text color (for any unknown language) is uno-2 and then for the languages that we support/control add the uno-4 back.

.css {
  &.source {
    .uno-4();
  }
}

Would have higher specificity which might messes up some stuff. Would have to try.

simurai added a commit that referenced this pull request Apr 15, 2015

Merge pull request #2 from braver/languages
Add more language support

@simurai simurai merged commit baff211 into simurai:master Apr 15, 2015

@simurai

This comment has been minimized.

Show comment
Hide comment
@simurai

simurai Apr 15, 2015

Owner

I still have this atom/atom#5903 issue pinned in my browser. Would be so cool to easily change the uno/duo colors without forking the whole theme.

"Salmon On Ice":
screen shot 2015-04-15 at 3 50 18 pm

Owner

simurai commented Apr 15, 2015

I still have this atom/atom#5903 issue pinned in my browser. Would be so cool to easily change the uno/duo colors without forking the whole theme.

"Salmon On Ice":
screen shot 2015-04-15 at 3 50 18 pm

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