I have two projects, both vue projects, but one project says I can’t use prettier as a formatting tool, and the other one works
You can see the screenshot below for details
The following two images indicate that the prettier is not recognized
enter image description hereenter image description here
The image below is another project that would normally have prettier selected as the default formatting tool
enter image description here
Where do I need to start with this question?
2
Answers
it is possible to select prettier as default formatting tool.
Open the Settings dialog ( Ctrl Alt 0S ), go to Languages & Frameworks | JavaScript | Prettier. Select Manual Prettier configuration and then select the Run on ‘Reformat Code’ action checkbox.
It is possible to set default by
editor.action.formatDocument.multiple
(it’s a key) button + click which you want have as default, then you can trigger your default formatting tool byeditor.action.formatDocument
buttonOr you can append your config, so in
C:UsersYesAppDataRoamingCodeUsersettings.json
I have:and make sure you have modern version of vscode(I have 1.85.0), because they once broke the updater by separating "system setup" and "user setup"
to solve this, just over_re_install vscode