Search code examples
phpstormreactjs

PhpStorm HTML completion in JSX-files


I have started new project with Facebook's React library. And I have found that PhpStorm can't complete html-code in *.jsx files. It only do if a press "Ctrl+Space".

Here is an example. I typed <div cla></div> and expected drop-down list with code suggestions.

In *.html or, for example, *.ejs files there IS code completion:

Also PhpStorm cannot auto-suggest HTML-elements, cannot auto-close tags etc.

Preferences / Languages & Frameworks / JavaScript => JavaScript language version is set to JSX Harmony

I am using PhpStorm 9.0.2 right now. Also tried in 8.0.3. Didn't work.

P.S. I watched video about React in WebStorm (A Deep Dive into WebStorm 9's New Features) and there IS auto code completion.


Solution

  • Completion works for me in PHPStorm 9.0.2. But, unlike completion in HTML files, it doesn't auto-popup on typing - you need to explicitly hit Ctrl+Space inside HTML tag to get the intellisense. If this doesn't work for you, please create a support ticket