google / google/google-java-format

Allow chaining native Reformat Code with google-java-format IntelliJ Plugin

Open
#1,250 0 comments 0 reactions 0 assignees View on GitHub
IntelliJ
Dominant language
Java
Stars
6.2k
Forks
937
Avg merge
6m
Merged PRs (30d)
3

Description

The documentation for Using the formatter > IntelliJ/Android Studio/JetBrains IDEs states: "When enabled, the plugin fully replaces the native ​​Reformat Code​​ and ​​Optimize Imports​​ actions."

This design prevents developers from leveraging IntelliJ's built-in Code Style features (e.g., automatically adding a blank line after class headers via Editor > Code Style > Java > Blank Lines > After Class Header), even though this requirement aligns with our team's coding conventions and does not conflict with google-java-format rules.

Our current workaround is to first ​​disable the google-java-format plugin​​ for built-in code formatting, then ​​re-enable it​​ to apply Google Java formatting rules. This operation is very tedious and makes us feel very sad.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.