Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Multiline YARD highlighting for tag–comment styles #228

@cbothner

Description

@cbothner

Description

YARD supports multiline comments for tags as long as the following lines are indented but atom-language-ruby does not extend syntax highlighting beyond the line. Namely, I expect the text on the second line to be green.

screen shot 2018-01-23 at 10 23 45

I am interested in implementing this but am looking for some guidance.

I tried naively to extend the yard_name_types pattern to match multiple lines, like this. But as y’all more experienced syntax highlighters already know, you can’t use multiline patterns.

I think the begin and end keys are promising, but while I can figure that maybe the begin pattern would be something like # @(attr|etc.), there’s no natural end key. How do you match “the lack of a comment line with two more spaces of indentation than this one” precisely enough?

Any ideas? Am I totally off base here? Is there a better dev workflow for language grammars than painstakingly restarting Atom after every change?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions