我目前正在使用VSCode和Django的最新版本。每当我通过巴普蒂斯特·达特内启用Django扩展时,HTML自动完成就会停止工作。如果我禁用Django扩展并重新加载VSCode,它将重新开始工作。如何使HTML自动完成与Django扩展一起工作?
发布于 2021-06-08 12:45:02
试试下面对我有用的解决方案:
发布于 2022-04-03 15:03:25
发布于 2021-06-16 10:25:16
只有通过在"emmet.includeLanguages": {"django-html": "html"}中添加settings.json,才能解决您提到的问题。
在此之前:
{
"terminal.integrated.rendererType": "dom",
"liveServer.settings.donotVerifyTags": true,
"liveServer.settings.donotShowInfoMsg": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"workbench.editorAssociations": {
"*.ipynb": "jupyter.notebook.ipynb"
},
"C_Cpp.updateChannel": "Insiders",
"grunt.autoDetect": "on",
"files.associations": {
"*.html": "django-html"
},
"[django-html]": {
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
}
}}
之后:
{
"terminal.integrated.rendererType": "dom",
"liveServer.settings.donotVerifyTags": true,
"liveServer.settings.donotShowInfoMsg": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"workbench.editorAssociations": {
"*.ipynb": "jupyter.notebook.ipynb"
},
"C_Cpp.updateChannel": "Insiders",
"grunt.autoDetect": "on",
"files.associations": {
"*.html": "django-html"
},
"emmet.includeLanguages": {"django-html": "html"},
"[django-html]": {
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
}
}}
您可以在这里看到讨论:https://github.com/vscode-django/vscode-django/issues/16
https://stackoverflow.com/questions/66173731
复制相似问题