Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>google-java-format-2New to Visual Studio Code? Get it now.
google-java-format-2

google-java-format-2

zhomart

|
878 installs
| (0) | Free
Yet another simple google-java-format runner with configurable args.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

google-java-format

This is yet another VS Code extension for running the google-java-format tool as a Java formatter. I could not make any of the others work for me, and I did not want to install an extension that will just run commands from random repositories on save. So, I wrote this, a super simple formatter provider that will just run the google-java-format script from e.g. Homebrew.

It should work as a formatter for only sections of files as well.

Features

It provides a formatter for the Java language, meaning it runs google-java-format for you.

Install google-java-format from e.g. Homebrew and set it as your Java formatter like:

"[java]": {
  "editor.defaultFormatter": "ilkka.google-java-format",
}

Extension Settings

Use the setting "google-java-format.executable-path" to set the path to the google-java-format executable. The extension does not look in $PATH right now.

Example settings:

{
  "google-java-format": {
    "executable-path": "$HOME/bin/google-java-format",
    "args": "--aosp --length 100"
  }
}

Known Issues

Nothing right now.

Release Notes

1.0.2

Stop output window always popping up.

1.0.1

Bugfix release to address disappearing changes.

1.0.0

Initial release.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft