Support for configuring tabs was added to the API in #1320, but there is not currently a CLI flag for it.
In general google-java-format remains committed to being an opinionated, low-configuration formatter (#425 (comment)). Line lengths and tabs are in a different category than configuration for core formatting layout decisions. Other opinionated formatters also support configuring line lengths and tabs.
The bug for line lengths (#425) reviewed more votes, there have been fewer requests for tabs. There's some evidence tabs are not as widely used as spaces in the Java ecosystem.
Another potential different from --max-line-length is that it's possible to convert spaces to tabs by post-processing the formatter output, i.e.
google-java-format - | unexpand -t 2
Adding a --use-tabs flag is currently unplanned, this bug tracks demand for it. If you would like to use google-java-format but its lack of support for tab-based indents is prevent you from doing that, please 'thumbs up' the bug or leave a comment.
Support for configuring tabs was added to the API in #1320, but there is not currently a CLI flag for it.
In general google-java-format remains committed to being an opinionated, low-configuration formatter (#425 (comment)). Line lengths and tabs are in a different category than configuration for core formatting layout decisions. Other opinionated formatters also support configuring line lengths and tabs.
The bug for line lengths (#425) reviewed more votes, there have been fewer requests for tabs. There's some evidence tabs are not as widely used as spaces in the Java ecosystem.
Another potential different from
--max-line-lengthis that it's possible to convert spaces to tabs by post-processing the formatter output, i.e.Adding a
--use-tabsflag is currently unplanned, this bug tracks demand for it. If you would like to use google-java-format but its lack of support for tab-based indents is prevent you from doing that, please 'thumbs up' the bug or leave a comment.