I'm working with CraftCMS, which uses Twig. One of the methods I use to add JS is e.g.
{% js at endBody %}
console.log('I am JavaScript');
{% endjs %}
I want to have it permanently highlighted as JavaScript, and not have to reinject it every time I open PhpStorm again.
According to https://www.jetbrains.com/help/phpstorm/using-language-injections.html#configure-injection-rules I need to add an injection rule. So I went to
- Editor
- Language Injections
- Add (+)
- Generic Twig
- (See image)
What do I have to enter in this window though? I'm a bit lost here. Any help is valuable :)