Hello,
As Prettier HTML formater give awkward results for now, I wanted to disable Prettier only for HTML.
I've encounter two problems to do so:
.prettierignore only works when in the root of the project, but often it's only need for a particular folder such as theme. So it could be nice to be able to place .prettierignore anywhere.
because of the first issue I needed to use the VsCode add-on settings prettier.disableLanguages": ["html"]. The problem is once Prettier is disable for HTML files, it also disable the VsCode generic HTML formater...
Thanks for your help.
Cheers
Prettier is ignoring all the vscode settings and formatting the code, wrapping attributes, closing divs. This has caused real issues in last two days.
Info: Using prettier out of the box without any modified settings, latest version installed on new installation of vscode and it still does that
For people affected, does HTML formatter work after restart?
@CiGit vscode team pointed out what causes this issue: https://github.com/Microsoft/vscode/issues/67055#issuecomment-461336289
Can you please take a look at this?
Hum the line pointed in this comment shouldn't return true. It shouldn't exist anymore as disableLanguages is now scoped to _window_ instead of _resource_. It existed when a language was enable in a parent workspaceFolder but not in a child workspaceFolder in which case it was a null-edit (NoOp).
On extension activation, registered languages are filtered
https://github.com/prettier/prettier-vscode/blob/master/src/extension.ts#L42-L79
Can you share your setup?
For people affected, does HTML formatter work after restart?
For me it did start working after restarting VS Code using
"prettier.disableLanguages": ["html"]
vscode 1.33 changed how formatters are called. This shouldn't be an issue anymore if you change the default formatter for HTML. (no need to restart)
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
For me it did start working after restarting VS Code using
"prettier.disableLanguages": ["html"]