Skip to content

feat: add missing core Jinja2 snippets (import, from-import, raw, filter)#55

Merged
EndlessTrax merged 3 commits into
mainfrom
copilot/add-missing-core-jinja2-template-snippets
Jul 22, 2026
Merged

feat: add missing core Jinja2 snippets (import, from-import, raw, filter)#55
EndlessTrax merged 3 commits into
mainfrom
copilot/add-missing-core-jinja2-template-snippets

Conversation

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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:

    Prefix Output
    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 $0 final cursor position.

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
Copilot AI requested a review from EndlessTrax July 22, 2026 00:06
@EndlessTrax
EndlessTrax marked this pull request as ready for review July 22, 2026 00:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, raw blocks, and filter blocks in snippets/jinja-snippets.json.
  • Updated README.md to include the four new ptj- 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.

Comment thread snippets/jinja-snippets.json Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@EndlessTrax
EndlessTrax merged commit 8084f8f into main Jul 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add Missing Core Jinja2 Template Snippets

3 participants