在VS Code中被识别为Django模板的HTML文件 [英] HTML files recognized as Django Template in VS Code
问题描述
我是VS Code的新手,之前来自ST3和TextMate.有点困惑,为什么单击右下角的语言指示器后,无法自动检测到HTML还是不能将其作为一种语言选择?
I'm new to VS Code, coming from ST3 and TextMate before that. A bit flummoxed why is HTML not autodetected nor is it offered as a choice of language after clicking on the lower-right language indicator?
我尝试将"files.associations":{"* .html":"html"}
明确添加到用户设置中.
I've tried explicitly adding "files.associations": {"*.html": "html"}
to the User Settings to no effect.
在macOS v10.12.6上运行VSCode v1.15.1.
Running VSCode v1.15.1 on macOS v10.12.6.
推荐答案
包括以下设置 emmet.includeLanguages的行:{" django-html:" html}
VSCode的settings.json:
Include the following line of setting emmet.includeLanguages": {"django-html": "html"}
in
VSCode's settings.json:
{
"python.jediEnabled": false,
"files.autoSave": "afterDelay",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection":
"automaticallyOverrodeDefaultValue",
"editor.minimap.enabled": true,
"workbench.colorTheme": "Monokai",
"editor.largeFileOptimizations": false,
"html.format.indentInnerHtml": true,
"html.format.indentHandlebars": true,
"emmet.includeLanguages": {"django-html": "html"},
"[django-html]": {
},
"files.associations": {
"*.html": "html"
}
}
它为我完成了版本1.33.1的修复
It does the fix for me on version 1.33.1
这篇关于在VS Code中被识别为Django模板的HTML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!