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

3 Answers 3

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 ;)

Sign up to request clarification or add additional context in comments.

Comments

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.

Comments

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.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.