Would you please have a look at the use cases below. Maybe you can help me to find the reason why Prettier 3.0.0 does not format Apex in IntelliJ Ultimate - 2023.1.4 + Illuminated Cloud 2 - 2.2.7.4.
My current setup is:
- IntelliJ Ultimate - 2023.1.4
- Illuminated Cloud 2 - 2.2.7.4
- Prettier IntelliJ plugin - bundled 231.9225.16
Use case - Prettier 3.0.0
Installed Prettier locally: npm install --save-dev --save-exact prettier prettier-plugin-apex
Got: "prettier": "3.0.0" and "prettier-plugin-apex": "2.0.1" installed.
Linked "prettier": "3.0.0" package under IntelliJ > Languages & Frameworks > JavaScript > Prettier.
Open Apex class > Reformat with Prettier and nothing happens. Sometimes I receive this error in a popup: "Prettier: File QueueableService.cls has unsupported type".
When I open any *.js file and run "Reformat with Prettier" the file is formatted.
Use case - Prettier 2.8.8
Installed Prettier locally: npm install --save-dev --save-exact pret...@2.8.8 prettier-p...@1.13.0
Got: "prettier": "2.8.8" and "prettier-plugin-apex": "1.13.01" installed.
Linked "prettier": "2.8.8" package under IntelliJ > Languages & Frameworks > JavaScript > Prettier.
Open Apex class > Reformat with Prettier - file gets formatted.