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

Feature request: allow themes to provide colour settings #30

Closed
robertrossmann opened this issue Oct 31, 2019 · 11 comments
Closed

Feature request: allow themes to provide colour settings #30

robertrossmann opened this issue Oct 31, 2019 · 11 comments
Assignees

Comments

@robertrossmann
Copy link

It would be great to allow theme authors to provide colour settings for this package. Unfortunately if the colours are defined via settings I believe theme authors have no way of providing themed colours for them and users need to change the colours themselves.

I would love to define the colour scheme for this package in Remedy theme. 🙏

Thanks in advance!

@usernamehw
Copy link
Owner

Do you think it's possible without introducing breaking changes?

@usernamehw
Copy link
Owner

Nice theme btw.

@robertrossmann
Copy link
Author

Sadly, I would not know - the only extension I ever worked on for VS Code was that theme and that's just flat JSON. I do not know how custom colour "contributions" work or what would be necessary to adopt them here. I'd just love to have the possibility to provide those colours through that theme.

Thanks! ❤️ Just released version 3.0 of it. 🚀

@usernamehw
Copy link
Owner

usernamehw commented Nov 1, 2019

Some comparison of the properties that are known to me:

Color Setting
Can get the value
Can change the value from settings GUI
Auto complete default/current value in settings
Color picker in settings.json
Assign color per theme
Use id of an existing color ✅❌ ✅❌

There is no way of getting the value (inline svg gutter icon/ css injected style won't work with color) microsoft/vscode#32813

Fill in current value in settings: microsoft/vscode#25633

@usernamehw usernamehw self-assigned this Nov 25, 2019
@usernamehw
Copy link
Owner

usernamehw commented Nov 25, 2019

The plan is to make this in a multi-step way.

  • Create color contributions
  • Make them under a config errorLens.useColorContributions (false by default)
  • Create light color contribution variants
  • Create command that transfers colors from settings to their Color contributions equivalent.
  • In the future: set it to true
  • If it can completely replace the settings - then delete settings. Otherwise - delete color contributions.

@usernamehw
Copy link
Owner

Added color tokens:

  • errorLens.errorBackground
  • errorLens.errorMessageBackground
  • errorLens.errorForeground
  • errorLens.warningBackground
  • errorLens.warningMessageBackground
  • errorLens.warningForeground
  • errorLens.infoBackground
  • errorLens.infoMessageBackground
  • errorLens.infoForeground
  • errorLens.hintBackground
  • errorLens.hintMessageBackground
  • errorLens.hintForeground

You can test them from 2.8.0 with

"errorLens.useColorContributions": true,

robertrossmann added a commit to robertrossmann/vscode-remedy that referenced this issue Nov 26, 2019
github-actions bot pushed a commit to robertrossmann/vscode-remedy that referenced this issue Nov 26, 2019
# [3.4.0](3.3.1...3.4.0) (2019-11-26)

### Features

* define custom theme colours for Error Lens ([f775695](f775695)), closes [usernamehw/vscode-error-lens#30](usernamehw/vscode-error-lens#30)
@robertrossmann
Copy link
Author

Thank @usernamehw for implementing this! ❤️ I have released Remedy v3.4 with colour contributions for this extension and it works great! Here, a screenshot of how it looks like when you install this extension and the Remedy theme - the colours exactly match other decorations of the same type.

remedy - errorlens decorations

I guess the only last missing thing would be to allow defining custom colour for the circle gutter marker, if that is possible. Otherwise I am very happy with this now! 🍻 🎨

@RobFosterNYC
Copy link

I would like to say thank you to @usernamehw
you really made my month. ive been waiting for updates on this extension for a very long time.
this makes me so happy. Again thank you for forking and fixing this extension and making it available.
Thank you :D

@usernamehw
Copy link
Owner

I'm closing this since most of the work is done.

@Alecton4
Copy link

Alecton4 commented Apr 8, 2022

Thank @usernamehw for implementing this! ❤️ I have released Remedy v3.4 with colour contributions for this extension and it works great! Here, a screenshot of how it looks like when you install this extension and the Remedy theme - the colours exactly match other decorations of the same type.

remedy - errorlens decorations

I guess the only last missing thing would be to allow defining custom colour for the circle gutter marker, if that is possible. Otherwise I am very happy with this now! 🍻 🎨

Sorry for creating a reply here, but what is the setting to display "inline icon" as shown in your picture? I think this is nice, but I don't have it and cannot find the setting for it. Did they remove this feature?

@usernamehw
Copy link
Owner

It's $severity from the inline message template:

"errorLens.messageTemplate": "$severity $message",
"errorLens.severityText": ["❗", "⚠", "ℹ", "👉"],

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

No branches or pull requests

4 participants