Hello, I am using Webstorm 2019.1.3.
In the respective Webstorm docs (https://www.jetbrains.com/help/webstorm/scope-language-syntax-reference.html) it is mentioned how to create a new scope from existing scopes using a special syntax for the existing scope name. For example, $Scope1||$Scope2, declares a new scope which is the join of Scope1 and Scope2 files.
In theory it sounds simple but in reality I could not create a new scope from another existing scope reference successfully using the aforementioned syntax. This is unfortunate because I have a rather complex scope, which includes many folders with excluded subfolders, and I would like to declare other scopes based on that definition (for example work on a subset of files ending in *.spec.js). It's a shame to have to copy/paste its definition (look below) in order to apply the extra filters that I want.
The complex pattern defining my reference scope looks like this:
The question is how to reference existing scopes in the declaration (in fact the "pattern" field in the scopes dialogue) and if you can enhance the documentation with more accurate and verbose examples.