burodepeper / minimal-syntax

A light syntax theme for Atom: high contrast/low brightness, three primary colors, easy on the eyes
MIT License
14 stars 6 forks source link

Support inline doc tags #9

Closed Kroc closed 7 years ago

Kroc commented 8 years ago

E.g.

/** @var set this to something */
public $nothing;

The tag doesn't get coloured as it does in a larger doc block, i.e.

/**
 * @var set this to something
*/
public $nothing;

Ironically GitHub also gets this wrong.

P.S. Absolutely love this theme, keep up the great work!

burodepeper commented 8 years ago

Hi @Kroc, first of all, thanks for the compliment!

As for your issue, I'm afraid it is due how language-php parses the php code. My theme doesn't do any parsing of its own, just colors elements that are exposed by the grammar parser.

See https://github.com/atom/language-php/blob/master/grammars/php.cson#L160-218 and more in particular https://github.com/atom/language-php/blob/master/grammars/php.cson#L167. The included #php_doc only works when the first line of a comment (block) is /**. I don't see why it can't be included in single line comments, so I suggest you create an issue about over there.

On a side-note, I'm keeping this issue open, because I don't like the blue on orange in the comments ; )

schermafbeelding 2016-04-26 om 10 58 09

Kroc commented 8 years ago

I've submitted changes to the PHP language grammar, and if those get accepted, then I will be able to solve the single-line docblock problem too.