PHPStorm Configuration: How to remove background color on embedded html?
Asked Answered
S

3

7

I find this "code highlighting" very annoying. Can someone show me how to disable it on PHPStrom, and perhaps explain why this happens?

Here's an image of my Js/Jquery code on PHPStorm IDE: enter image description here

Siphonophore answered 30/6, 2015 at 19:28 Comment(0)
T
12

In the WebStorm preferences go to Editor » Color & Fonts » General choose Injected language fragment from the list and turn off Background chackbox.

It's hard to answer _why it happens) - it's just a preference. Maybe someone prefers to see injected code (the code in language other than the main one used in given file) clearly marked. For me, it's also a distraction, I have just turned it off inspired by your question ;)

Tumer answered 30/6, 2015 at 19:35 Comment(0)
D
1

That's Language Injection in action.

You cannot disable it -- ATM language injections in JavaScript cannot be disabled.

But you can remove/change background color at Settings (Preferences on Mac) | Editor | Colors & Fonts | General.

Detrital answered 30/6, 2015 at 19:34 Comment(0)
E
0

Update: 2024-08-29

This feature has now moved to; Editor > Color Scheme > Language Defaults As of today, last option at the bottom called "Template language".

By switching this off, you can remove the mixed code background highlighting.

Epochal answered 29/8 at 15:52 Comment(1)
This isn’t really a new answer, per se, but a correction to an answer now outdated by a change in the software. A good way to address this is to suggest an edit to an existing answer so it’s up-to-date with the current software.Sundberg

© 2022 - 2024 — McMap. All rights reserved.