Search code examples
intellij-ideawebstorm

WebStorm option to prevent XML/HTML conversion of JavaScript code


I've recently moved from VSCodium to IntelliJ, and I can't seem to find any option to prevent the IDE from mangling simple JavaScript code upon pressing Tab. I frequently line my code up (manually) and prefer my IDEs to just get out of my way as much as possible.

As far as I can tell, I've turned off all suggestions, etc., but this is still happening. It does this in various situations, but the most basic example is:

when I press tab following a variable

I don't have any idea why it would think that I want to convert this line into XML, even less why it wouldn't wrap the value if I wanted to convert this line. Nothing pops up (no suggestions) to alert me that something might happen if I press Tab?

The only extension that I have installed manually is EJS (and I've confirmed that this is not to blame by disabling it). I've disabled all others that look like they could potentially care about JavaScript (i.e., not disabled version control / Docker, etc.).

I'm sure that this is very simple, but it's getting annoying now and I can't find it. How can I do it?

EDIT

This is still happening with Emmet disabled. Something else is still going on...

still when I press tab following a variable

And Emmett is off:

Emmett settings


Solution

  • That feature you are experiencing there is called Emmet and can be disabled in certain contexts such as JSX for example via our settings under Editor > Emmet > JSX. If you want to learn more about using Emmet in contexts such as HTML templates (where it hopefully doesn't interfere with your workflow) you can check our documentation.

    Settings page disable Emmet in WebStorm