Skip to content

DIFF highlighting (feature request) #90

@balthisar

Description

@balthisar

I'll look into this myself, too, as I have some time but I wanted to capture it here for discussion.

Currently SMLSyntaxColouringDelegate offers delegates for syntax groups allowing applications to customize the coloring of groups (i.e., the attributes, strings, etc.). However a line-by-line delegate method would be useful, too. Although I have in mind the specific case of highlighting diff results, I'm sure other line-based custom highlighting cases can be found.

Adding to the existing delegate seems like the logical place and would allow the application to pass back a block providing any arbitrary styling desired for the line while keeping Fragaria light-weight.

(Alternatively it could be handled similar to the error icons with a dedicated delegate, but this might limit the styling that can be applied without making Fragaria too heavy in an effort to be universal.)

Something like:

fragariaDocument:shouldColorLine:withBlock:
and
fragariaDocument:didColourLine:withBlock

I've not worked with Fragaria's internals since early this year so I don't know how aware the syntax highlighter is of individual lines. It's something I will dig into when I have a chance unless someone beats me to it.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions