Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Prettier Java PluginNew to Visual Studio Code? Get it now.
Prettier Java Plugin

Prettier Java Plugin

RudraPatel

|
4,605 installs
| (11) | Free
Format Java files with Prettier using prettier-plugin-java.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info


Prettier Java Plugin Logo
Prettier Java Plugin

Format Java files with Prettier using prettier-plugin-java. No configuration necessary.

Features

  • Format Java files with no configuration necessary
  • Specify a Prettier config file to use if desired

Extension Settings

To set this formatter as the default formatter for Java files, add the following to your VSCode settings:

"[java]": {
  "editor.defaultFormatter": "RudraPatel.prettier-plugin-java-vscode"
}

This extension contributes the following settings:

  • prettier-plugin-java-vscode.enabled: Enable/disable the plugin.
  • prettier-plugin-java-vscode.prettierConfigPath: Provide an absolute, relative, or workspace-relative path to a Prettier config file. If not provided or missing, the extension will attempt to resolve the config file from the document file name.

Examples of valid config paths include:

  • An absolute path: /home/user/my-project/.prettierrc
  • A relative path .prettierrc
  • A workspace-relative path ${workspaceFolder}/.prettierrc

The Output channel will display information about how this config file path is resolved.

Release Notes

1.0.3

  • Add support for relative and workspace-relative config paths

1.0.2

  • Update logo to follow VSCode guidelines

1.0.1

  • Upgrade dependencies

1.0.0

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