1 Default html syntax hints in VSCode
VSCode (1.64) automatically adds HTML syntax hints after the default installation is completed, but after installing the Django plugin, the automatic syntax hints for the html file in the Django project file change to django-html syntax, and the original html syntax hints are gone.
2 The first method: directly modify the relevant options in the "Settings".
Django plugin installation to restore the original html syntax hints and retain the django-html syntax hints.
You need to set the corresponding properties in VSCode, VSCode open the settings, above the search box, type file association, the file association properties for the corresponding configuration
Add items to the Additions section under Files:Associations.
After adding the above options, add the Emmet syntax abbreviation hint as well
Through the above two steps, you can write html files in the Django template file can have both html syntax prompts, can also have django-html syntax prompts.
3 Second method: Configuration in a file
The above two steps are cumbersome, but you can also modify the VSCode file directly to achieve the above effect.
Open Settings and click "Open Settings (json)" in the upper right corner.
Add the following settings:
"": { "**/*.html": "html", "**/templates/**/*.html": "django-html", }, "": { "django-html": "html" },
summarize
to this article on the VSCode installation Django plugin to achieve html syntax prompts article is introduced to this, more related VSCode to achieve html syntax prompts content, please search for my previous articles or continue to browse the following related articles I hope you will support me more in the future!