vscode-django
vscode-django copied to clipboard
Incorrect formatting on Save
Extension is formatting the template incorrectly breaking the template.

I figured out I have prettier extension installed which was formatting the file. I can disable prettier to format html file but that's no good. I want the file formatted with this extension instead of default html.
I have the following config in settings.json under .vscode
{
"python.formatting.provider": "black",
"[html]": {
"editor.defaultFormatter": "batisteo.vscode-django"
},
"emmet.includeLanguages": {
"django-html": "html"
},
"files.associations": {
"**/*.html": "html",
"**/templates/**/*.html": "django-html",
"**/templates/**/*": "django-txt",
"**/requirements{/**,*}.{txt,in}": "pip-requirements"
},
}
I'm having the same issue.
Fixed by using *.html
in .prettierignore
thanks to this answer