palantir-java-format
palantir-java-format copied to clipboard
Provide a CLI binary like google-java-format for easy integration into other editors
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.
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