Search code examples
javascriptphpstormecmascript-6file-typejetbrains-ide

Why does PHPStorm hide a file when I add its extension to the JavaScript file type?


I've got PHPStorm v9 and I'd like to get syntax support for ES6 in files with the extension .es. My project has some files with that extension which another developer has used for ES6 source files.

Whenever I add .es to the Recognized File Types in Settings > Editor > File Types, .es files immediately disappear from the Project view. This happens when I add them to JavaScript and to ECMAScript 6. When I remove the extension the files appear again.

enter image description here

I've checked the "Ignore files and folders" input doesn't include .es. I've tried this with and without the JavaScript.next Support Plugin, and with the JavaScript language version set to ECMAScript 6 and JavaScript 1.8. I've tried moving the .es files to separate directories (in case PHPStorm was madly assuming test.es was the same file as test.js).

What gives, JetBrains?


Solution

  • WEB-15841 is fixed in WebStorm 11/PHPStorm 10. The problem is that .es extension association was hardcoded (assigned to ActionScript language) for historical reasons