Jinja flavored Markdown for Zed
A Zed extension that provides syntax highlighting for Jinja templating language combined with Markdown.
Purpose
When working with LLM prompts, you often need to inject dynamic content. While LLMs can handle Markdown's basic structure well, these are static files that require manual context injection. This can be as straightforward as simple string formatting, but can quickly become cumbersome when you need to iterate through data or apply conditional logic.
Instead of manually handling these injections, why not leverage Jinja's powerful templating capabilities ? Jinja can efficiently manage context injection, including conversation history, tool definitions, and user queries, with features like loops and conditionals that make the whole process much more manageable.
An additional benefit: prompts can now be version-controlled separately from code.
Examples
Markdown only: nice but hard to read
Jinja only: easy to read but ugly
Jinja flavored Markdown: best of both worlds !
Installation
NB: the extension is not yet published, install as a dev extension for now.
Install this extension directly in Zed:
- Open Zed
- Go to Extensions (cmd+shift+X on macOS, ctrl+shift+X on Linux/Windows)
- Search for
Jinja flavored Markdown - Click Install
Or install as a dev extension.
Supported Languages
This extension provides syntax highlighting for the following language modes:
- Jinja - Pure Jinja templates (
*.jinja,*.jinja2,*.j2) - Jinja flavored Markdown - Markdown files with embedded Jinja syntax (
*.md.j2)
Contributing
If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
License
This extension is licensed under the MIT License.
Resources
This extension uses the following Tree-sitter grammars for accurate parsing:
- tree-sitter-markdown - Markdown grammar
- tree-sitter-jinja - Jinja grammar


