1 Default html syntax prompt in VSCode
VSCode (1.64) automatically adds HTML syntax prompts after the default installation is complete, but after installing the Django plug-in, the automatic syntax prompts for html files in the Django project file become django-html syntax, and the original html syntax prompts are gone.
2 The first method: directly modify the relevant options in the "Settings"
After the Django plug-in is installed, in order to restore the original html syntax prompt and retain the django-html syntax prompt
, you need to set the corresponding properties in VSCode, open the settings in VSCode, enter file association in the search box above, and configure the file association properties accordingly
in Files: Add items in the added items under Associations
After adding the above options, add the Emmet syntax abbreviation prompt.
After the above two steps, you can have both HTML syntax prompts and HTML syntax prompts when writing html files in the Django template file django-html syntax hints.
3 The second method: configure in the setting.json file
The above two steps are relatively cumbersome, and you can also directly modify the setting.json file of VSCode to achieve the above effect.
Open the settings, click "Open Settings (json)" in the upper right corner
to add the following settings:
"files.associations": {
"**/*.html": "html",
"**/templates/**/*.html": "django-html",
},
"emmet.includeLanguages": {
"django-html": "html"
},