How to change error styles in VS code?

I am trying to highlight the error more aggressively, is this possible in VS Code?

Basically change the style of this:

enter image description here

UPD: an example of aggressive highlighting in webStorm:

enter image description here

+4
source share
3 answers

v1.12 and higher

Setting colors for underlining errors is now available initially through workbench.colorCustomizationsthe workspace settings. See here .

"workbench.colorCustomizations": {
  "editorError.foreground": "#000000", // squiggly line
  "editorError.border": "#ffffff" // additional border under squiggly line
}

Unfortunately, as far as I can find, currently my own settings are limited to this. For example, to highlight an error with a background color, you still have to resort to the plugin method below ...


v1.7.2 and higher

css vscode-custom-css.

custom-styles.css ( )

.monaco-editor.vs .redsquiggly,
.monaco-editor.vs-dark .redsquiggly {
  background: rgba(255,255,255,0.2);
  border-bottom: 1px solid #fff;
}

custom-styles.css, Preferences > User Settings (settings.json)

{
  "vscode_custom_css.imports" : [
    "file:///path/to/file/custom-styles.css"
  ]
}

(Mac: cmd + shift + P, Windows/Linux: ctrl + shift + P) Enable Custom CSS and JS, VS.

!

: Screenshot using the above styles

- - custom-styles.css, VS-, / .


N.B. @Stepan Suvorov github @Matt Bierner css, .

- VS, -, , -, - VS Code - , . - , - , .

- , , VS Code . !

+4

, , VSCode. . css redsquiggly

VSCode

+1

After almost a year, unfortunately, vscode-custom-css stops working for me; vscode meanwhile introduced some settings for layout customization.

Try adding this to your user preferences:

{
  // ...,
  "workbench.colorCustomizations": {
    "editorError.border": "#ca2323a4",
    "editorError.foreground": "#ffffffb7"
  }
}

It will show errors in this way:

enter image description here

0
source

Source: https://habr.com/ru/post/1661308/


All Articles