Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Google Java Format for VS CodeNew to Visual Studio Code? Get it now.
Google Java Format for VS Code

Google Java Format for VS Code

Jose V Sebastian

|
8,357 installs
| (5) | Free
Visual Studio Code extension to format Java files using google-java-format program to comply with Google Java Style.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Google Java Format for VS Code

Visual Studio Marketplace Version Visual Studio Marketplace Installs Visual Studio Marketplace Rating Stars GitHub release workflow semantic-release: conventional commit

Format your java files using Google Java Format program which follows Google Java Style (or AOSP).

Extension Settings

This extension contributes the following settings:

  • java.format.settings.google.executable: Not Recommended. Specifies url or file path to Google Java Format jar executable. Overrides java.format.settings.google.version.
  • java.format.settings.google.version: Recommended. Specifies version to be used of Google Java Format executable in format {major}.{minor}.{patch}. Default: latest.
  • java.format.settings.google.mode: Specifies the runtime mode of Google Java Format. Used with java.format.settings.google.version. Default: native-binary, alternative: jar-file.
  • java.format.settings.google.extra: Extra CLI arguments to pass to Google Java Format.

Please refer Google Java Format repository for available versions and CLI arguments.

Extension Commands

This extension contributes the following commands:

  • Google Java Format For VS Code: Clear Cache: Clear cache of Google Java Format executable downloads by the extension.
  • Google Java Format For VS Code: Reload Executable: Reload the Google Java Format executable using the current configuration.

How to Debug

To debug this extension and see how exactly it invokes the formatter, use Developer: Set Log Level... to enable Debug for this extension, and then open the Output tab and select this extension.


Enjoy!

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