Syntax highlighting and snippets for the Jinja template language in VS Code
open sourceMITfree
A VS Code extension that adds syntax highlighting and snippets for the Jinja template language. It has three language modes, Jinja, Jinja HTML and Jinja YAML, mapped to common file extensions (.j2, .jinja, .jinja2, .html.j2, .yml.j2, .sls and others), and other files can be mapped with files.associations. Emmet works in Jinja HTML, and script and style blocks comment as JavaScript and CSS. It leaves VS Code's built-in HTML and YAML languages alone, and it provides no language server, so there's no IntelliSense, go to definition or formatting. MIT licensed.
Problems it solves
- syntax highlighting for Jinja2 templates in VS Code
- highlight Ansible or Salt .j2 template files in my editor
- Jinja snippets in VS Code
Features
- Jinja, Jinja HTML and Jinja YAML language modes
- syntax highlighting and snippets
- maps .j2, .jinja, .jinja2, .html.j2, .yml.j2 and .sls files
- Emmet in Jinja HTML
- leaves the built-in HTML and YAML languages untouched
Limitations
- No language server: no IntelliSense, go to definition or formatting
- Jinja HTML is a separate language from HTML, so files must be mapped to it (by double extensions such as .html.j2, or files.associations)
Alternatives
The same job
These do what Jinja for Visual Studio Code does.
- Django extension for Visual Studio Code Beautiful syntax and scoped snippets for perfectionists with deadlines
