Groovy formatter/beautifier in Visual Studio Code

Groovy formatter/beautifier in Visual Studio Code

I dont know how well this works for formatting other than indentation, but I simply changed the file extension from .groovy to .js, right clicked in the file, and selected Format Document. It fixed the indentation for me.

There is now a Visual Studio Code extension to Lint, Format and Auto-fix Groovy and Jenkinsfiles ! 🙂

https://marketplace.visualstudio.com/items?itemName=NicolasVuillamy.vscode-groovy-lint

Groovy formatter/beautifier in Visual Studio Code

It would only be available via an extension, which you can search for in the marketplace.

Unfortunately it doesnt look like there are many extensions for Groovy at all. And if that can be considered an indication of the languages popularity, its highly unlikely that broad support would ever be added to VS Code out of the box.

Leave a Reply

Your email address will not be published.