A plugin for the IntelliJ platform to quickly render and review Jinja templates.
- A Python interpreter has to be installed on your system. -
The Jinja2
package is also mandatory:
pip3 install Jinja2
Quick Jinja will try to load and use Ansible-specific filters.
So this package is optional:
pip3 install ansible
(NOTE: ansible
already includes the Jinja2
package)
Use the IDE's built-in plugin system:
File
--> Settings...
--> Plugins
--> Marketplace
Quick Jinja
Install
-buttonOr go to the plugin page on the JetBrains-website, download the archive-file and install manually.
Before actually using Quick Jinja you should check/test your Python environment by using the plugin's settings page:
The plugin does not detect or use any (virtual) environment settings of your current project. However, you can use an individual script/executable that does the necessary/individual preparations.
Example:
create a quick-jinja
folder in your home directory:
mkdir ~/quick-jinja
change into it, and create a dedicated virtual environment:
cd ~/quick-jinja
python3 -m venv venv
activate the virtual environment and install Ansible
via pip
:
source venv/bin/activate
pip install ansible
finally, create this script file (~/quick-jinja/run.sh
):
#!/bin/bash
source ~/quick-jinja/venv/bin/activate
python3 "${@}"
don't forget to make it executable:
chmod +x ~/quick-jinja/run.sh
Reference this script in the plugin; and you should be ready to go. :thumbsup:
Everything should be pretty self-explanatory.
Here's a detailed description anyway. :grinning:
Please read the license file.
If you like this plugin, please consider a donation. Thank you!