Skip to content

feat: support Django and Jinja language identifiers - #67

Merged
EndlessTrax merged 2 commits into
mainfrom
feat/expanded-template-language-support
Oct 11, 2026
Merged

EndlessTrax merged 2 commits into
mainfrom
feat/expanded-template-language-support

Conversation

@EndlessTrax

Copy link
Copy Markdown
Owner

Template files recognized as django-html, jinja, or jinja-html currently have no Python Template Snippets contributions. Add the six missing registrations while preserving all three HTML registrations and all snippet definitions.

Closes #44.

Language ID General Jinja Django
html Yes Yes Yes
django-html Yes No Yes
jinja Yes Yes No
jinja-html Yes Yes No
  • package.json: register the existing catalogs under the appropriate language IDs.
  • scripts/validate-snippets.js: validate supported, nonempty language IDs, real file paths, duplicate mappings (including normalized paths), required mappings, and framework separation without depending on entry order.
  • README.md: document supported modes and the language extensions needed for recognition.

Language IDs were checked against the Django manifest, Jinja manifest, and Better Jinja manifest. VS Code uses manifest language contributions as the default scopes for these catalogs, so existing snippet-level scope values require no changes.

Validation:

  • npm ci --cache ../npm-cache: passed using the existing lockfile. A writable cache was needed in this environment. npm reports two existing development dependency advisories; dependencies and lockfile are unchanged.
  • npm test: passed; 3 catalogs, 30 prefixes, 9 registrations.
  • Deliberately removed each of the nine required registrations: all rejected. Ten additional invalid metadata cases were rejected, including duplicates, normalized duplicate paths, empty/nonstring/unknown language IDs, missing files, directories, wrong framework, null entries, and empty paths. Reversed manifest entry order passed. All mutations restored.
  • npx vsce package: passed. The packaged manifest matches the source manifest, and every packaged snippet catalog matches main byte-for-byte.
  • git diff --check: passed.
  • VS Code 1.141.0 Extension Development Host: programmatic editor tests passed for all four modes, checking all 30 snippet names in each mode (120 availability/exclusion checks), prefix expansion for every applicable snippet using the tab-completion command, and placeholder editing/navigation. Tests ran in an isolated profile with a temporary extension registering the three additional language IDs; no test tooling or dependencies were added to the repository. External language extensions' automatic filename recognition and manual IntelliSense GUI interaction were not tested. Local tooling ran on Node.js 24; PR CI checks Node.js 20.

Relationship to #3: .j2 files benefit when a language extension recognizes them as jinja or jinja-html (or another supported mode). This does not implement arbitrary filename-pattern activation, add language definitions, or override file associations. #3 remains separate and open.

No version bump, release, Marketplace publication, or release tags.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T12:14:14.616009Z d4423ad PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d4423ad0dc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/validate-snippets.js Outdated
@EndlessTrax EndlessTrax self-assigned this Oct 11, 2026
@EndlessTrax EndlessTrax added the enhancement New feature or request label Oct 11, 2026
@EndlessTrax
EndlessTrax requested a balanced review from Copilot October 11, 2026 12:23

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.

🟡 Changes recommended

Native path normalization makes the new validator fail on Windows.

1 open finding
What changed in this PR

Adds snippet support for Django and Jinja language identifiers while preserving HTML behavior.

Changes:

  • Registers six additional language/catalog mappings.
  • Validates manifest registrations and framework separation.
  • Documents supported language modes and recognition requirements.
File Description
package.json Registers snippets for Django and Jinja modes.
scripts/​validate-snippets.js Validates snippet registrations and paths.
README.md Documents supported modes and extensions.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/validate-snippets.js Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@EndlessTrax
EndlessTrax merged commit 207b5ff into main Oct 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Expand Language Support to django-html, jinja, and jinja-html

2 participants