如何在 Visual Studio Code 中同时自动完成 HTML 和 Django-HTML?

如何在 Visual Studio Code 中同时自动完成 HTML 和 Django-HTML?

问题描述:

我已经在 Visual Studio Code 中安装了 Django 支持,并根据扩展要求将 */templates/*.htmldjango-html 相关联.

I've installed Django support in Visual Studio Code and associated */templates/*.html with django-html as the extension demands.

但是,它不能自动竞争 HTML 标签,因为我已经这样做了.

However, it can't auto-compete HTML Tags as I've done so.

如果我只是将 HTML 与其自身相关联,那么 它不能智能感知 Django模板代码.

And if I just associate HTML with itself, then it can't intellisense Django Template code.

如何自动完成两者?

我做到了:

  • 安装 Django 扩展

将以下配置添加到我的工作区 settings.json 文件中:

adding the following configuration to my workspace settings.json file:

    "emmet.includeLanguages": {
         "django-html": "html",
    }