如何在 Visual Studio Code 中同时自动完成 HTML 和 Django-HTML? [英] How can I autocomplete both HTML and Django-HTML simultaneously in Visual Studio Code?

查看:38
本文介绍了如何在 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",
    }

这篇关于如何在 Visual Studio Code 中同时自动完成 HTML 和 Django-HTML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆