Replies: 1 comment
-
That's something I was meaning to add support for JetBrains ide for t-regx for a very long time now, but I don't know how to do it well :/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
does anyone know how to configure PHPStorm so that RegEx patterns used as parameters for methods of this library are correctly recognized as RegEx patterns without enclosing slashes?
I know I can use PHPStorms inject language (using PHPDoc) functionality to let the IDE know that the string is a RegEx pattern, but since PHPStorm expects RegEx patterns to be enclosed in delimiters like /pattern/ it incorrectly treats the first character as the delimiter.
It's also possible to define new Language Injection Rules under Settings->Editor->Language Injection->+ or by duplicating an existing rule like "PHP RegExp in preg_* functions first argument", but that requires defining a Places Pattern using PhpStorms Program Structure Interface (PSI) and doesn't appear to be well documented.
Beta Was this translation helpful? Give feedback.
All reactions