- Go to Preferences > Plugins > Install JetBrains plugin
- Find the Twig plugin and install it
- Go to Preferences > Editor > File Types
- Find the Twig file type and add one more custom extension "*.nunj"
Now all the *.nunj files are parsed as Twig (the template engine identical to Nunjucks).