Remove green highlight?

Answered

Any way to remove this green highlight? https://i.imgur.com/xwL76bI.jpg

That's a template literal using back ticks. I have the styled-components plugin active but am using emotion, which is basically the same.

1
5 comments

PS: There are no warning messages on the right side of the screen, just the annoying green highlight.

0

Hi there,

It indicates that another language (CSS in your case) is injected into that variable (so it allows syntax coloring and provide code completion).

The green background color can be changed at "Settings/Preferences | Editor | Color Scheme | General | Code | Injected language fragment"

8

for people coming here in the future: if you're dealing with a green highlight from copied code, by default there should be a tab on the bottom row of your IDE that shows the code that's marked as duplicate and pressing the x on the tab should get rid of the highlight

5

@Jovicab

I have a green selection color also. It's not another language (for me), but a spell checker that shows typo

That's not the "green highlight" then (where the text has a solid light green background).

If it's a typo then it will be green underwave. Grammar errors will be light red underwaves. At very least those are defaults in standard bundled themes here in 2022.2.

In either case: colors come from the Color Scheme/Theme and can differ between them. It's always worth posting a screenshot + code sample as a text (so it can be copy-pasted and tested locally): it can show nuances that are otherwise can be missed or ignored.

The quick fix / intentions menu (shown on Alt+Enter or via light bulb icon) should provide hints on what that is (based on what entries are listed there).

0

just press escape button

0

Please sign in to leave a comment.