Integrating Nunjucks with IntelliJ IDEA / Webstorm
Just found a solution. Configure a custom extension with Twig files. It's a template engine with similar syntax (but for PHP).
add Twig Support plugin if necessary
Go to Settings -> Editor -> File Types and add find Twig
Add the custom pattern
*.njk
.
Now all *.njk
files are parsed as Twig so in the end you have support for Nunjucks.
Webstorm don't has build-in TWIG support.
You need to manually download it from here: https://plugins.jetbrains.com/plugin/7303 then choose Preferences > Plugins > Install plugin from disk...
and chose the file you just downloaded.
Then follow FireCoding's solution.
Worked perfectly for me in Webstorm 11.0.3