How to Auto-Complete both HTML and Django-HTML simultaneously in VSCode?

被刻印的时光 ゝ 提交于 2021-01-22 06:31:06

问题


I've installed Django support in VSCode,and associate */templates/*.html with django-html as the extension demands.

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

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

So anyone can help me about auto-completing both??


回答1:


I managed to do so by:

  • install django support

  • add following configuration to my workspace settings.json:

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



回答2:


As @namespace_Pt said, I tried and it work. I will list which extensions are in my vscode.

  1. Django 1.2.0

  2. Visual Studio IntelliCode(I tried, it work without this one)

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

I added it, at the end of the settings.json. I find the file from settings's search bar. Just undo what VSCode added itself and add the code above. Don't forget to add comma.

Where you find .json file in settings

How is it look like after added it



来源:https://stackoverflow.com/questions/61744003/how-to-auto-complete-both-html-and-django-html-simultaneously-in-vscode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!