IntelliJ syntax highlighting for jinja files (.jinja, .j2)

Try the Python plugin with IntelliJ IDEA Ultimate, that has support for Jinja2 Templates.

This plugin: offers some support for jinja files.

To ensure that this plugin is associated with jinja files:

  • Go to File > Preferences > Editor > File Types
  • Under Recognized File Types scroll down to YAML/Ansible and select it
  • Under Registered Patterns click the + icon and enter *.jinja.

    enter image description here

With this configuration in place your jinja files will open into this plugin. If they do not, then jinja files must be already associated with one of the other Recognized File Types in which case you'll need to scroll through them to find the culprit and remove *.jinja from its Registered Patterns.