點燈坊

失くすものさえない今が強くなるチャンスよ

Integrating Nunjucks with WebStorm

Sam Xiao's Avatar 2021-11-30

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

twig000

Preferences -> Plugins

  • Add Twig plugin

Add njk Extension

twig001

Preferences -> Editor -> File Types -> Twig

  • Add *.njk for Twig

twig002

Conclusion

  • The syntax of Nunjucks is similar to Twig, so that we can use Twig plugin for Nunjucks