Search code examples
htmlcsssassphpstormtranspiler

PhpStorm groups SCSS/CSS files ignoring my configuration


I am running PhpStorm 2016.3.2 (I believe it is the current latest).

Since I've updated to this version, css files are always grouped / nested under their scss source files in the project tree, regardless if I have a SCSS watcher or not.

I've tried creating a completely empty new project, with no file watchers whatsoever, and manually created two files: test.scss and test.css. Immediately, the test.css got grouped under the test.scss.

Furthermore (in another project), I am using a custom transpiler, which creates a x.html file for each x.scss file in addition to the x.css file. However, no matter what I set in the Output paths to refresh field, PhpStorm will always group the CSS file, and only the CSS file under the SCSS node.

I am trying to make it also group the HTML file under that node, but ideally I want to know why is it doing any grouping at all when there are no file watchers?

I do want to point out that this was NOT an issue in the previous version.

Is there some hidden setting I am missing, is it a bug or is it a mandatory new "feature"?


Solution

  • Is there some hidden setting I am missing,

    No.

    is it a bug or is it a mandatory new "feature"?

    It's a new feature -- file nesting no longer relies on presence of File Watcher (and the need to run it to have files actually nested).

    At the moment it's implemented as hard-coded list of rules which you cannot modify (but you may try and suggest other rules and why they will be good).

    UPDATE: The list of nesting rules is fully customizable since 2017.2 version. You can access those rules via cog icon in Project View panel where you may add your own or even disable such nesting.

    enter image description here