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"
}
]
}
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 todjango-html,jinja, orjinja-html. In those files, the snippets provided by this extension are not available.Solution
Expand the contributes section in
package.jsonto map general and engine-specific snippets to these language IDs: