WebStorm: Disabling language injection coloring

221 views Asked by At

WebStorm is injecting the css coloring rules in my JavaScript. For example in the following code block...

$('.navbar-collapse ul li a').click(function() {
        $('.navbar-toggle:visible').click();
});

Everything inside '.navbar-collapse ul li a' is colored according to the css color rules. I would like this to be colored like a normal javascript string.

I have tried the following to no avail...

  • Disable everything under Settings --> Editor --> language inejects
  • Disable everything under Settings --> Editor --> Intentions --> Language injections
  • Disable the intelliLang plugin.
1

There are 1 answers

0
LazyOne On BEST ANSWER

Currently that's not possible.

  1. Language Injections that are done automatically (hard coded, if you wish) in JavaScript code cannot be disabled manually.

    https://youtrack.jetbrains.com/issue/WEB-1475 -- watch this ticket (star/vote/comment) to get notified on progress.

  2. Because it cannot be disabled, you may only remove some background colors for injected fragments (color that indicates that this is an injection fragment) .. as all "front" (characters) colors are taken from that injected language (CSS in your case), unless, of course, you get rid of all colors for CSS as well (which then will affect actual .css files).


Disable everything under Settings --> Editor --> Intentions --> Language injections

This will do nothing for you -- those are "quick fixes"/helpers that have to be invoked manually anyway.