vscode-highlight
vscode-highlight copied to clipboard
Decoration override by Theme
You can specify decorations by Theme with the following setting
"highlight.regexes": {
"(//TODO)(:)": {
"regexFlags": "g",
"filterLanguageRegex": "markdown",
"filterFileRegex": ".*\\.ext",
"decorations": [ // Decoration options for not specified themes
{ "color": "yellow" },
{ "color": "red" }
],
"[One Dark Pro]": {
"decorations": [
{ "color": "green" },
{ "color": "tomato" }
]
}
}
}
It looks like a pretty nice feature, I'm not sure though one would want to provide anything other than different decorations for a theme, so maybe the [theme]
property should just accept an array of decorations as a value? I'm not sure 🤔
@rioj7 Let me know what you think is best/cleanest in your opinion and I'll merge this.
@fabiospampinato I have made it so it looks similar to other theme overrides done in settings.json
, and this is robust in case you need to add another setting that might be theme specific
[Comment from just a random user:] I just wanted to change my theme and ran into this problem (i.e. my nice custom colours don't work with another theme). This PR seems to be just perfect, I would immediately start using it!
This would definitely help. I use a dark theme for night and a light theme for day, so when I swap from one to the other, it would be good to have highlights do their thing automatically.
I have looked at the conflict, I will resolve the conflict in config.js and hope fabio will merge this PR