Skip to content

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

Description

@EndlessTrax

Problem

Currently, the extension registers template snippets only for the standard "html" language ID. However, most developers working with Django or Jinja templates use popular extensions (such as "Django" by Baptiste Darthenay or "Jinja" by wholroyd) that set the VS Code language ID to django-html, jinja, or jinja-html. In those files, the snippets provided by this extension are not available.

Solution

Expand the contributes section in package.json to map general and engine-specific snippets to these language IDs:

	"contributes": {
		"snippets": [
			{
				"language": "html",
				"path": "./snippets/snippets.json"
			},
			{
				"language": "html",
				"path": "./snippets/jinja-snippets.json"
			},
			{
				"language": "html",
				"path": "./snippets/django-snippets.json"
			},
			{
				"language": "django-html",
				"path": "./snippets/snippets.json"
			},
			{
				"language": "django-html",
				"path": "./snippets/django-snippets.json"
			},
			{
				"language": "jinja",
				"path": "./snippets/snippets.json"
			},
			{
				"language": "jinja",
				"path": "./snippets/jinja-snippets.json"
			},
			{
				"language": "jinja-html",
				"path": "./snippets/snippets.json"
			},
			{
				"language": "jinja-html",
				"path": "./snippets/jinja-snippets.json"
			}
		]
	}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions