atom/solarized-dark-syntax

Customizing `@`

Closed this issue · 13 comments

Hi there!

Would it be possible to use a different color for the @ annotations in comments other than pink? Whenever I see that color I'm constantly thinking they're TODO items since those use the same color.

example

Also, it feels like the bright pink is too attention-grabbing. Maybe use something a little more subtle?

hmm. A good place to start with this would be to open the inspector and see if the @ sign and param (in this instance) are treated as different entities in the underlying markup (which I believe for javascript they are not). This may hinge on changes being made to the javascript language package

Ah I see. So this issue goes beyond Solarized?

This may be. I'll see whats up with it this weekend if anyone else does not hop on it before me

Thanks Jake!!

Is this for JS?

They both have the .storage.type.class. scope, but then TODOs have an additional .todo and in my case @param an additional .jsdoc. So you could override it in your user styles.less with:

atom-text-editor::shadow .storage.type.class.jsdoc {
  color: #268bd2; // blue
}

Or style the TODOs differently with:

atom-text-editor::shadow .storage.type.class.todo {
  color: orange;
}

Not sure if this should be part of the theme or just on a user basis.

The original cause for notice was from a JS file, but I brought this up for a more broader question of whether or not TODOs should have the same style as params.

I see.. maybe also FIXME could have a different color.

I'm still unsure about this. We could change it in this theme, but it seems all themes behave like this. So if we change it, it would have a bigger impact to change it in either language-todo or language-javascript

Maybe not highlight params when they are inside a comment/documentation block?

No I'm a fan of highlighting. What would be awesome is tokenizing with an additional class for the particular annotation to allow customization. So for exampling, adding a todo token if it's a TODO or a fixme token if it's a FIXME. Then you could leave it up to the themes or developers to choose how they want it colored.

What would be awesome is tokenizing with an additional class for the particular annotation to allow customization.

That already works. In your styles.less file, you can add this:

atom-text-editor::shadow .storage.type.class.fixme {
  color: orange;
}

And then all FIXMEs are orange.

Here all the options

atom-text-editor::shadow .storage.type.class {
  &.todo    { color: darkseagreen; }
  &.fixme   { color: red; }
  &.changed { color: orange; }
  &.xxx     { color: grey; }
  &.idea    { color: yellow; }
  &.hack    { color: red; }
  &.note    { color: cornflowerblue; }
  &.review  { color: lightcoral; }
}

screen shot 2015-11-12 at 11 03 04 am

So shall we just close this and leave it up to the developers to choose how to color it?

I would think so. Keep in mind to that everything can be changed to your tastes in your styles.less file 😄