Add custom themes support for semantic highlighting
This is a proposal to add customization for the already existing semantic highlighting support. Right now, this is something that I really want myself personally and feel a huge lack of this. With this, You can now add custom themes / use some default provided one to semantically highlight your code that looks good and merges in with your "normal" color theme.
The approach I have taken is very simple. Use simple json files for themes, just like in kate.
- Each key in the json file is a Textmate scope taken from here.
- Each key can have 3 values: foreground, bold, italic. This makes it simple to prevent problems like taking care of background color / selection color or not obstructing the "current-line-highlighting".
Right now there is now actual UI to modify the theme. You have to modify the json file by hand.
Room for further improvements:
- Don't create attribute for each scope every time. If two scopes have same style values, just reuse. This is simple to achieve I think, with introduction of another key:
- More themes of course.
I think we should provide corresponding themes for at lease some of the themes that we already have in ksyntax-highlighting.
BUG: 431014 BUG: 431011