PhpStorm provides a set of predefined rules. You can edit these rules as well as define your own custom ones.
Show files with the same names as nested according to the rules below
When the check box is selected, PhpStorm recognizes children files based on the patterns from the list and shows them grouped under the corresponding parents. Compare the presentation of the above TypeScript example with file nesting enabled:
When the check box is cleared, PhpStorm shows parents and children at the same level.
Click this button to add a new row and specify the "parent" file suffix and the matching "child" file suffix.
Click this button to remove the selected rule from the list.
Use the default ruleset ()
Click this button to discard all your custom patterns and reload the default rules.