/scalafmt-server

Scala formatter server for text editors (like vim)

Primary LanguageScalaMIT LicenseMIT

HTTP server to format Scala code from text editors (like vim)

Build Status

Why

scalafmt starts slowly (as any JVM-based app) and nailgun is buggy and unmaintaned (?)

That's sad

Usage

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

License

Licensed under the terms of MIT (read LICENSE.txt for details)