-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
Cannon format JSON with comments on save (mode = modifications) #2330
Comments
I have a similar issue. I suspect that this is tied to saving modifications: if I use the command palette (Ctrl+Shift+P) and select "Format Document", everything seems to work properly. However, if I select "Format Modified Lines" or "Format Selection" instead, I get a popup message with the same text (except that it says it can't format 'Markdown' files). I also wonder if this is related to #2331: it's a similar looking issue, but there's not enough information in that post to be able to confirm. Additional Logs + DetailsOutput from Prettier Logs
VSCode + Platform InfomationVersion: 1.63.2 VSCode Settings File (JSON)VSCode Config JSON
|
Prettier VSCode doesn't support the setting |
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. |
Summary
I can prettify a json with comments file (say
.vscode/tasks.json
) both from the CLI and using Format Document inside vscode. But when I save the document, the auto-formatter fails with:Perhaps this has to do with my
"editor.formatOnSaveMode": "modifications"
setting, but I don't see a clear relationships between this mode and comment support, so I'm reporting it just in case.Steps To Reproduce:
.vscode/settings.json
and save it.Expected result
Changes are formatted.
Actual result
Changes aren't formatted. This message is shown in the statusbar:
Additional information
VS Code Version: 1.61.2
Prettier Extension Version: 9.0.0
OS and version: macOS Big Sur
Prettier Log Output
The text was updated successfully, but these errors were encountered: