You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
VSCode offers a formatting hook for extension authors to write a method to format files, but this isn't implemented in the SFDX packages.
Describe the solution you'd like
Ideally the solution would match the formatting pattern in the developer console.
Describe alternatives you've considered
There are alternatives via other extensions, such as uncrustify or prettier, but those are additional plugins that require set up time.
Additional context
There is a stackexchange question from nearly two years ago, about the lack of this feature, but with the latest updates, you still get the same "cannot format" message when you use the shortcut. I'm hoping this request brings more attention to this missing feature - since I didn't find any other requests when I did a quick search in the repo.
Hi @seanh-massmep thanks for providing feedback. For Apex, we decided to partner with a Salesforce community member and go the route of having formatting through prettier. This is in line with the rest of the formatting options we offer which are also done through prettier.
We don't plan to ship Prettier by default, but do include it in our recommended extensions. While Prettier is quite popular, some like to use other code formatters, so we leave you the choice rather than pushing an install.
Is your feature request related to a problem? Please describe.
VSCode offers a formatting hook for extension authors to write a method to format files, but this isn't implemented in the SFDX packages.
Describe the solution you'd like
Ideally the solution would match the formatting pattern in the developer console.
Describe alternatives you've considered
There are alternatives via other extensions, such as uncrustify or prettier, but those are additional plugins that require set up time.
Additional context
There is a stackexchange question from nearly two years ago, about the lack of this feature, but with the latest updates, you still get the same "cannot format" message when you use the shortcut. I'm hoping this request brings more attention to this missing feature - since I didn't find any other requests when I did a quick search in the repo.
https://salesforce.stackexchange.com/questions/212382/format-apex-code-visual-studio-code/212571
The text was updated successfully, but these errors were encountered: