this extention inherit from https://github.com/vscode-django/vscode-django, thanks.
.django
.dj
"files.associations": {
"**/views/**/*.html": "django-html",
"*.tpl": "django-html"
},
shift+alt+f
Format Document
"[django-html]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "junstyle.vscode-django-support"
},
prettier-ignore
and prettier-ignore-start
When you are not happy with how Prettier formats a certain element or section in the code, you can tell it to leave it in peace:
{# prettier-ignore #}
<div class="weird-formatting" >This will not be re-formatted</div>
<div class="weird-formatting" >But this will be</div>
You can also tell Prettier to leave entire regions as they are:
{# prettier-ignore-start #}
...
{# prettier-ignore-end #}