vscode-highlight icon indicating copy to clipboard operation
vscode-highlight copied to clipboard

Decoration override by Theme

Open rioj7 opened this issue 3 years ago • 5 comments

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" }
      ]
    }
  }
}

rioj7 avatar Nov 21 '20 15:11 rioj7

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 avatar Dec 25 '20 21:12 fabiospampinato

@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

rioj7 avatar Dec 26 '20 13:12 rioj7

[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!

cysouw avatar Jan 24 '21 00:01 cysouw

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.

pvinis avatar May 17 '21 19:05 pvinis

I have looked at the conflict, I will resolve the conflict in config.js and hope fabio will merge this PR

rioj7 avatar May 20 '21 04:05 rioj7