htmlautocompletephpstormphpstorm-2017.2

PhpStorm auto-completing HTML attributes with {braces} instead of "quotation marks"


Problem

I've recently upgraded to the latest PhpStorm (or what was the latest recently.)

PhpStorm 2017.2.4
Build #PS-172.4155.41, built on September 15, 2017

Since doing this, any time I type a HTML tag with an attribute, such as

<td class=

it auto-completes it JSX style, with curly braces, like so:

<td class={}

Desired functionality

It used to auto-complete it with quotation marks, like so:

<td class=""

And I'd like it to do this again.

Caveat

I'm able to disable the curly brace completion by disabling quotation mark completion setting, but of course, I don't get the quotation marks either.

enter image description here

Question

Is there a setting such that I can keep getting the "quotation mark" auto-complete, without getting the {curly brace} completion?


Solution

  • It happens if you have React JSX as default language level in the JavaScript settings (Settings/Preferences | Languages & Frameworks | JavaScript).

    The problem is fixed (WEB-28894) in 2017.3 EAP builds.

    For 2017.2.x builds -- you will have to use different JavaScript Language Level.


    Separate option was introduced in 2017.3.1 to control this behaviour: https://blog.jetbrains.com/webstorm/2017/12/webstorm-2017-3-1/