atom / one-dark-syntax

Atom One dark syntax theme
MIT License
448 stars 236 forks source link

Comment documentation highlighting is incorrect for class properties. #99

Closed RealBlazeIt closed 6 years ago

RealBlazeIt commented 7 years ago

Comment documentation highlighting is incorrect. When adding a comment such as:

/**
 * A dog.
 * @prop {string} name The name of the dog.
 */
class Dog { ... }

The name of the property would show up as grey like the description, instead of being red. Here is a screenshot of how it looks: http://prntscr.com/g5ip5b This is how the name should look: http://prntscr.com/g5ipc5

I know this can be fixed by putting the comment directly over the property declaration itself, however, both should correctly function, as they do in all other JavaScript syntax highlighters, include GitHub's, as you can see above.

RealBlazeIt commented 7 years ago

The same issue is present for type definition declarations.

/**
 * @typedef {object} CommandOptions The command options.
 */

This code shows up as http://prntscr.com/g5j9bu with no highlighting on the CommandOptions.

ibnesayeed commented 6 years ago

In my opinion, tokens of documentation comments should not have the same brightness as the main code body. This makes reading the code very difficult. While syntax highlighting on those token in the comment might be good, but their darkness should be increased to distinguish from the main code body tokens. The following screenshot shows how noisy those comments could look, especially when reading large files. This issue is not specific to just the One Dark theme, but also many other themes. There is a thread on this matter in the Discuss portal.

atom-comment-highlight

simurai commented 6 years ago

I can't reproduce this issue (anymore). name and CommandOptions get highlighted.

screen shot 2018-08-23 at 3 45 08 pm

It might got fixed in the language package.