Registering reference providers for Twig tokens in PHPStorm


I try to register a reference provider for a TwigTokenTypes.STRING_TEXT, using the registrar in the contributor. Unfortunatly this leads not the call of the provider while ctrlclick or ctrlhovering it.

I tried a simple matching condition:

 psiElementCapture = PlatformPatterns.psiElement(TwigTokenTypes.STRING_TEXT);]]>

And I tried a more complex condition:

 psiElementCapture = PlatformPatterns.psiElement(



Both do not match in any way.

Original message URL:

Please sign in to leave a comment.