Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoration override by Theme #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rioj7
Copy link

@rioj7 rioj7 commented Nov 21, 2020

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 rioj7 mentioned this pull request Nov 21, 2020
@fabiospampinato
Copy link
Owner

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.

@rioj7
Copy link
Author

rioj7 commented Dec 26, 2020

@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

@cysouw
Copy link

cysouw commented Jan 24, 2021

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

@pvinis
Copy link

pvinis commented May 17, 2021

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.

@rioj7
Copy link
Author

rioj7 commented May 20, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants