feat: add missing core Jinja2 snippets (import, from-import, raw, filter)#55
Merged
EndlessTrax merged 3 commits intoJul 22, 2026
Merged
Conversation
Copilot
AI
changed the title
[WIP] Add missing core Jinja2 template snippets
feat: add missing core Jinja2 snippets (import, from-import, raw, filter)
Jul 22, 2026
EndlessTrax
marked this pull request as ready for review
July 22, 2026 00:06
EndlessTrax
approved these changes
Jul 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds four missing core Jinja2 snippet entries to the VS Code snippet extension and documents them in the README, improving template authoring coverage for common Jinja constructs.
Changes:
- Added new Jinja2 snippets for
import,from ... import,rawblocks, andfilterblocks insnippets/jinja-snippets.json. - Updated
README.mdto include the four newptj-snippet prefixes in the Jinja2 reference table.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| snippets/jinja-snippets.json | Introduces four new Jinja2-specific snippet definitions (import/from-import/raw/filter). |
| README.md | Extends the documented Jinja2 snippet table with the newly added prefixes and example outputs. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four commonly-used Jinja2 constructs were missing from
jinja-snippets.json: macro imports, from-imports, raw blocks, and filter blocks.Changes
snippets/jinja-snippets.json— adds four new snippets:ptj-imp{% import 'filename.html' as name %}ptj-from{% from 'filename.html' import macro %}ptj-raw{% raw %}...{% endraw %}ptj-fil{% filter filter_name %}...{% endfilter %}README.md— updates the Jinja2-specific snippet reference table to include the four new entries.All snippets follow existing conventions:
ptj-prefix namespace, single-quoted string literals, tab-stop placeholders with descriptive defaults, and$0final cursor position.