Updated prettier today and html formatter no longer works
See original GitHub issueInfo
- Platform: macOS
- Vetur version: 0.11.6
- VS Code version: 1.19.2
- Prettier Vs Code: 1.1.2
Problem
my configuration below no longer works after updating prettier
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"indent_size": 2,
"end_with_newline": false,
"wrap_attributes": "force-aligned",
"wrap_attributes_indent_size": 2,
"editorconfig": true
}
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Prettier not formatting HTML files in VS Code - Stack Overflow
Long Answer: Most of the times the reason why Prettier doesn't work is that you have a markup error. ex: you haven't close...
Read more >Format on Save (prettier) stopped working with latest update
Same thing happened to me just now. I set prettier as the Default Formatter in Settings and it started working again. My Default...
Read more >How to fix Prettier Extension not working issue in VS CODE
0:00 · New ! Watch ads now so you can enjoy fewer interruptions. Got it.
Read more >Prettier extension not working on HTML files : r/vscode - Reddit
First make sure that you don't have multiple extensions to format html files. Uninstall the ones that you don't need - or at...
Read more >Prettier not working in VSCode – possible fixes - LinuxPip
Set Prettier as Default Formatter. VSCode have a huge ecosystem of extensions, which includes numerous formatters for multiple different ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello Vetur users!
Since prettier-vscode@1.1 we register a formatter for “vue” files (prettier@1.10). It seems it’s interacting badly with Vetur which does the same… (and seems we are wining the formatter battle ✌️ ) You can disable prettier on
vue
filesprettier.disableLanguages: ["vue"]
(restart vscode) and continue to use Vetur’s formatter which also formats the html template part of your SFC. Prettier only takes care ofscript
andstyle
part.I don’t know if you can do the opposite tho.
I just tried prettier
"vetur.format.defaultFormatter.html": "prettier"
and it works for html partvetur@0.12.6 prettier@1.6.1