node.jsvisual-studio-codeprettier

Prettier Format Document


Have Prettier formatting correctly but only when Ctrl+shift+P and selecting "Format Document With..." -> "Prettier - Coder formatter".

When selecting "Format Document" does nothing...

There is a third option "Format Document (Forced)" this works and formats the file but seems to indicate some kind of problem because refers to the word Forced

Now I want to format when saving but doesn't work as well, but seems because the "Format Document" is not working, what configuration is still missing? or wrong configuration that needs fixing?

In user settings

"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSaveMode": "file",
"editor.formatOnSave": true,

I added this one to test but didn't change anything

"prettier.requireConfig": true

Solution

  • Got it to work seemed related to another issue that had to do with also not working

    "go to definition"

    with the Ctrl+click or F12.

    where the solution was disable all installed extension reload VSC and enable all extensions but also at end of the day was uninstalling two extensions related to OpenVMS and seems to fixed both issues that had.