UPDATE: I've been able to run prettier manually using
npx prettier --config .prettierrc --write .\force-app\main\default\classes
but I still cannot have it to work on save.
Hello everyone, I'm looking for some help with VS Code and Prettier
After some research I've found multiple possible solutions but none of them seems to be able to fix my problem. I installed Prettier and the Apex plugin following this tutorial: https://developer.salesforce.com/tools/vscode/en/user-guide/prettier.
Prettier is formatting my code perfectly for any language except Apex. For example, I can format a JSON or a lwc no proble. It's setup as the default formatter, I'm using Java SDK 11, my package and .prettierrc documents are configured and there is just no output when I save on an Apex class or trigger.
The plugin is installed locally and globally. you can see the versions and the sign that shows when I switch from a JSON to an Apex class for example.
I was wondering if you had any ideas on how to fix this for me.
Thanks in advance, Oli