abhinavk99 / codewall

VS Code extension that checks if code goes past your rulers
https://marketplace.visualstudio.com/items?itemName=abhinavk99.codewall
MIT License
7 stars 1 forks source link

Change color of ruler when there's an error #4

Closed abhinavk99 closed 3 years ago

abhinavk99 commented 3 years ago

I don't think this is possible. When you update the configuration, you have to update globally or per workspace, but getting the configuration merges global and workspace settings, so it wouldn't be possible to reset ruler colors to what they were originally after changing them.

abhinavk99 commented 3 years ago

This might actually be possible using VS Code Decorations API (https://vscode.rocks/decorations/). I might be able to just add a vertical line decoration with a specific color.

abhinavk99 commented 3 years ago

Unfortunately, it didn't work because VS Code decorations are per line and only apply until the end of the line, so lines that are shorter than the ruler won't be able to have a decoration at the ruler length. Also, depending on the decoration's color it might be masked by the ruler color.