-
-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prettier-VSCode does not respect .prettierrc configuration for HTML formatting #638
Comments
Can you share the repo shown in your video? (Not private) |
I created the following repository with one html file that reproduces the issue: vscode-prettier-bug.zip |
I wanna use default vscode formatter for html. I guess perviously prettier doesn't have html formatter, but in 1.7.2, prettier tries to format html, so it doesn't respect vscode default html formatter. I also tried to set |
same problem, install 1.6.1, it works .(this problem happened since ver1.7.0+ ) |
It seems we do not infer the same parser as prettier's cli.
The extension doesn't take into account files' extensions, only vscode's languageId To workaround this issue. You can specify explicitly the parser you want to use. |
In my case, another extension was causing this issue. I uninstalled "XML Tools" and it started working! |
VS Code now prompts you to select which formatter to use when you have multiple on the same file type. |
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. |
I am having similar issues to the ones that have been raised before,
prettier-vscode
does not seem to respect my project's.prettierrc.json
configuration when formatting HTML files. The print width seems to be defaulted to 80 instead of our custom value of 100.My vscode is setup to format on save, and our project's
package.json
references"prettier": "1.15.2"
.The extension is up to date in vscode too.
Our project does not have a print width setting in the
.editorconfig
file either.I created a video reproduction of the issue where I save an AngularJS template file in vscode and it gets wrongly re-formated, and then apply the Prettier CLI on that file which puts it back to its correct format.
The video is available here (Dropbox - 2.1 MB).
The text was updated successfully, but these errors were encountered: