WebStorm doesn’t support Nunjucks by default, and we have to add the Twig
plugin manually to integrate Numjucks with WebStorm.
Version
WebStorm 2021.3
Twig
Preferences -> Plugins
- Add
Twig
plugin
Add njk Extension
Preferences -> Editor -> File Types -> Twig
- Add
*.njk
for Twig
Conclusion
- The syntax of Nunjucks is similar to Twig, so that we can use Twig plugin for Nunjucks