Scala formatter server for text editors (like vim)
HTTP server to format Scala code from text editors (like vim)
scalafmt
starts slowly (as any JVM-based app) and nailgun
is buggy and unmaintaned (?)
That’s sad
Unpack and run the server
sbt universal:packageZipTarball
tar xzf target/universal/scalafmt-server-*.tgz
scalafmt-server-*/scalafmt-server.sh 8899 &
If you’re using vim-autoformat:
let g:formatdef_scalafmt = "'path/to/scalafmt-client.sh 8899'"
let g:formatters_scala = ['scalafmt']
au BufWrite *.scala :Autoformat
Licensed under the terms of MIT (read LICENSE.txt for details)