palantir-java-format icon indicating copy to clipboard operation
palantir-java-format copied to clipboard

Provide a CLI binary like google-java-format for easy integration into other editors

Open blacksails opened this issue 1 year ago • 1 comments

With jdtls having become quite good it is more and more common to write java in editors other than intellij and eclipse. It is easy to automate formatting when the formatter can be run in CLI-mode like google-java-format can. Having a binary version of the formatter would make it easy to integrate into neovim and other editors.

blacksails avatar Aug 15 '24 07:08 blacksails

To build the binary, it suffices to run the following task:

gradle nativeCompile

Then you can add the compile binary into your local PATH env:

ln -sf $PWD/palantir-java-format-native/build/native/nativeCompile/palantir-java-format-linux-glibc_* ~/.local/bin/palantir-java-format

JingMatrix avatar Sep 02 '25 17:09 JingMatrix