I gave up on prettier for formatting html because if insists on closing all void tags.
It just produces invalid html and pretends like it's fixing it.
Browsers have traditionally been ignoring this invalid syntax and that's why it works at all, but that's no excuse for a code formatter that calls itself "prettier" to be doing this.
The built in formatter in vscode is much more sensible in my opinion.
There's a very specific, defined and limited set of void tags ("area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track" and "wbr") that are not meant to be closed.
By their very nature, void tags are identified by comparing their tag name against a predefined array of strings.
However, my templating engine adds a new self closing tag called "include" for rendering partials. It is never sent to the browser, but just like any other void tag is written inside of html files and is not meant to be closed.
So here comes my question.
Is there any way to configure that array somehow for the builtin html formatter in vscode (vscode.html-language-features) to add just one more string to it?
Btw, I am aware of ITagData#void. But, unfortunately, despite looking very promising, it doesn't actually appear to be working. Or, at least, not in the way that would affect formatting.