phindle / error-lens

Visual Studio Code extension which enhances the display of errors and warnings.
https://marketplace.visualstudio.com/items?itemName=PhilHindle.errorlens
MIT License
89 stars 40 forks source link

Contribute colors instead of settings #7

Closed usernamehw closed 1 year ago

usernamehw commented 5 years ago

There is a way to contribute colors in vscode extension: https://code.visualstudio.com/docs/extensionAPI/extension-points#_contributescolors

That will allow for users to change colors per theme and hot reload of colors. You can also set it to theme default color (error/warning - some themes don't use red/orange).

Ash258 commented 5 years ago

@usernamehw Do you close this on purpose??

I am looking to open issue for hot reload colors, but this issue already contains it, so not sure if I missed something.

Reload

usernamehw commented 5 years ago

Don't really remember ... I forked it and used color contributions in local version.

Edit: maybe master branch of this extension is different and contains hot-reload, not sure.

phindle commented 5 years ago

Hey @usernamehw - how do I access the theme color (e.g. "errorLens.errorColor") via an API? I've added things as a color contribution, but I'm not sure how to get these now.

usernamehw commented 5 years ago

@phindle like that:

const errorColor = new vscode.ThemeColor("errorLens.errorColor");

You should probably create issue in vscode docs if it's not obvious.