Repository navigation
Jinja Syntax and Jinja Palettes: community plugins for .j2 / .jinja templates #46915
alvarovegaromero
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I made two community plugins for Jinja / Jinja2 templates. Use them if you work with Flask, Django-style, Ansible or Salt templates.
Jinja Syntax
Highlighting for
.j2,.jinjaand.jinja2files. It uses the Better Jinja grammar, the same one VS Code and Cursor use.page.html.j2,base.jinja): Jinja tags plus HTML,<style>CSS and<script>JavaScript.id="p-{{ item.id }}"andconst n = {{ items | length }};are colored too. VS Code leaves these plain.values.yaml.j2,nginx.conf.j2,.env.j2,.sql.jinja…): only the Jinja parts are colored, so YAML is never read as HTML.for/if, variables, filters and tests, numbers, strings and{# #}comments each get their own color, in any Orca theme.{# #}, and{{,{%and{#close themselves.Jinja Palettes (optional)
One Dark, Dracula, Monokai, Nord, GitHub Light and Solarized Light, tuned so each part of a template stands out. You can use one as the whole app theme, or only as the editor theme in Settings → Appearance. Making your own palette means changing about 15 named colors.
Install
In Settings → Plugins, search for Jinja Syntax, or run:
orca plugin install alvarovegaromero/orca-jinja-syntax orca plugin install alvarovegaromero/orca-jinja-palettes # optionalBoth plugins are data only: they run no code and ask for no permissions.
This replaces my core PR #40465, which I closed so new languages can ship as plugins and keep Orca light. Feedback and requests for more file extensions are welcome in the repos' issues.
All reactions