Inspections (green background)

Does anybody know if I do to remove the green background (inspection) in my code? The 'lamp tip' (light bulb icon) don't show me how to resolve it (check my screenshot).

This is showed in my screenshot from line 4 to 25. I tried in PREFERENCE > EDITOR > INSPECTION > JavaScript,  ... > LANGUAGE INSPECTIONS and ... > INTENTIONS too, both without success.

Thanks a lot


8 comments
Comment actions Permalink

This highlighting indicates language injection - WebStorm auto-injects HTML in ES6 template strings. This injection is hardcoded and can't be disabled. If you don't like its green background, you can change the color in Preferences | Editor | Colors & Fonts | General / Code / Injected language fragment settings, Background.

3
Comment actions Permalink

Thanks so much Elena, you went straight to the point and save my live.

Best Regards
@RicardoBiruel

1
Comment actions Permalink

In Version 2018.1.1 on Windows the background setting is found in Settings | Editor | Color Scheme | General | Code | Injected language fragment.

I wish some tooltip would show reason for highlighting. Searching through the Settings is quite time consuming.

1
Comment actions Permalink

Its so irritating that there is nothing to tell you what is causing the highlight. IMO highlights should only be there when there is an issue to resolve. This was driving me mad. 

1
Comment actions Permalink

In that case, shouldn't the green background span across the entire injection, not just parts of it?

0
Comment actions Permalink

@Jakub Szafrański

>In that case, shouldn't the green background span across the entire injection, not just parts of it?

It does. But you may have actual injected language colors that may have own background (e.g. looking at initial screenshot -- style for HTML tag has own background color .. so it overrides green injection background as it's painted on top).

1
Comment actions Permalink

In my case it was about `duplicated code`.

I just clicked on suggestions (lightbulb icon) -> show duplicated code, after this, fragment of the code was highlighted green.

I just removed highlighted code and added it once again, green background dissapeared.

0

Please sign in to leave a comment.