There is no formatter for 'apex' files installed
See original GitHub issueI followed the directions in https://developer.salesforce.com/tools/vscode/en/user-guide/prettier
I am able to run the commands you listed
prettier --debug-check "/path/to/project/**/*.{trigger,cls}"
in the readme and it does format all my classes and is working fine. But I can’t trigger a manual format of a document after that, and even though I have the format on save setting enabled it doesn’t do anything on save.
When I try to manually format a class (shift option F) I get the error message that. There is no formatter for ‘apex’ files installed. My Editor:Default Formatter setting is set to esbenp.prettier-vscode.
Is this plugin supposed to be compatible for format on save and manual formatting? It’s working as expected when I run the commands in terminal, but not in other cases I’d use daily.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Related StackOverflow Question
I totally understand. Prettier Apex can be used both globally and locally, but the VSCode Prettier extension is a separate project to this and it has its own assumption about the location Prettier Apex can be installed.
I’ll close this ticket for now, feel free to ask more questions if you still cannot get it to work.
I see, I’ll go through that document again to try to reinstall.
In the Prettier Apex readme it says we can install globally or locally so I was following that.
Thanks for the help.