trishume / syntect

Rust library for syntax highlighting using Sublime Text syntax definitions.
https://docs.rs/syntect
MIT License
1.85k stars 130 forks source link

Add parsing of gutterSettings #506

Closed timhillgit closed 5 months ago

timhillgit commented 7 months ago

Many TextMate2 themes use gutterSettings to store colors for the gutter area. This is not supported by Sublime Text. This PR enables using gutterSettings to set the foreground and background of the gutter but only if they are not already set in settings.

Closes #469

keith-hall commented 7 months ago

Looks good to me. Probably it would also make sense to update the unit tests at https://github.com/trishume/syntect/blob/d3f6d22a709e142ab93875104106998b5b22a524/src/highlighting/theme_set.rs#L87 to prove it parses it as expected.

timhillgit commented 7 months ago

Ah, that's a good idea, I was only looking at theme_load so I missed it. I'll add that in.

timhillgit commented 5 months ago

@keith-hall Are there any more unit tests or anything else you'd like to see before this is merged?