Skip to content

[html-templating] easy way to inherite advanced html features #49210

Description

With the vscode extension Better Jinja the jinja-html language highlights jinja html templates, however some more advanced features available with the html langauge are not working with jinja-html:

  • highlighting the opening tag when the cursor is in the closing tag (and visa versa) image image In the second case with jinja-html as the language all divs are highlighted, not just the sibling of the tag under the cursor
  • auto creating the closing tag once the opening tag is created.

And probably more, but these are the two which would be most useful.

How do I get these advanced features working in my child language definition?

I've tried copying most of the config from extensions/html/package.json and extensions/html/language-configuration.json into my extension but to no avail. I also tried looking through extensions/html-language-features but there's nothing obvious there to include.

This isn't as simple as adding more file extensions somewhere, even in a .html file if the language is changed to jinja-html the features above disappear.

  • VSCode Version: 1.22.2 3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9 x64
  • OS Version: ubuntu 18.04

Steps to Reproduce:

  1. install "Better Jinja"
  2. open or create a file with some html in
  3. change the language to jinja-html
  4. try using advanced html features as described above

Does this issue occur when all extensions are disabled?: Yes (the advanced features work with the html language without extensions, obviously the error can only be shown with the extension installed)

Metadata

Metadata

Labels

feature-requestRequest for new features or functionalityhtmlHTML support issuesverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions