alecthomas / chroma

A general purpose syntax highlighter in pure Go
MIT License
4.39k stars 402 forks source link

rrt style: Missing syntax highlighting for `.diff` files #603

Open Nuc1eoN opened 2 years ago

Nuc1eoN commented 2 years ago

Greetings,

I am using the theme rrt and I love it! But I've noticed that it does not syntax highlight .diff files at all.

Take this sample:

- foo
+ bar

And try it on https://swapoff.org/chroma/playground/.

It works perfectly with the monokai style, while rrt does not provide any highlighting. However other styles seem to be affected, too.

Thanks in advance, I hope it can be resolved. I did not seem to have any issues with rrt with other file formats and I do love the theme! :)

serhack commented 2 years ago

Is there any color in particular you want? Otherwise I'll commit this:

<entry type="GenericDeleted" style="#f92672"/>
<entry type="GenericInserted" style="#a6e22e"/>

image

Nuc1eoN commented 1 year ago

Hi @serhack, Thank you for asking my opinion :) What do you think about:

<entry type="GenericDeleted" style="#f00"/>
<entry type="GenericInserted" style="#0f0"/>

and #87ceeb for the @@ and #ff0 for index and diff lines, like so:

rrt

I think it would suit the theme well. I reused other rrt colors, but they hopefully shouldn't collide here..