I'm using django built-in templates tags which are {% load static %} {% extends 'base.html' %} etc. so whenever I'm saving my document by pressing ctrl+s the formatting which should be gets disturbed which causes errors:
Unclosed tag on line 1: 'block'. Looking for one of: endblock.
before saving the document the editor looks something like this:

but as soon as I save my document it becomes like this which results in the above mentioned error

any solution for that? maybe add or remove some formatting extensions?

Okay so I tweaked around some settings.json in vscode and found my solution: add the following lines
My assumption to this solution is that, earlier this
[django-html]settings was not instantiated so by default adjango-htmltemplate was getting formatted through[html]settings as seen in the image below (pls correct me if my assumption is wrong).