ScalafmtEnhanced
Sublime Text 3 plugin to invoke scalafmt, a code formatter for Scala.
Details
Installs
- Total 234
- Win 93
- Mac 81
- Linux 60
Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Scalafmt for Sublime Text 3
Sublime Text 3 plugin to invoke scalafmt, a code formatter for Scala.
Requirements
scalafmt (1.5.1): https://github.com/scalameta/scalafmt/tree/v1.5.1
coursier (1.1.0): https://github.com/coursier/coursier
nailgun client (0.9.1): https://github.com/facebook/nailgun/tree/nailgun-all-0.9.1
Prerequisites
Create scalafmt_ng
binary somewhere in your PATH
, for instance in /usr/local/bin
:
coursier bootstrap --standalone com.geirsson:scalafmt-cli_2.12:1.5.1 \
-r bintray:scalameta/maven -o /usr/local/bin/scalafmt_ng \
-f --main com.martiansoftware.nailgun.NGServer
Make sure you use the same version of nailgun in the client ng
and the one packaged in com.geirsson:scalafmt-cli
.
Usage
Place a file .scalafmt.conf
in your project folder. The file is searched from the folder containing the scala file to format down to the project root. When .scalafmt.conf
is found in the directory tree, automatic formatting will be enabled on save.
The formatting can also be invoked from the sublime commands when the active file is recognized as a scala source file.
Configuration
See https://scalameta.org/scalafmt/docs/configuration.html
Remarks
The nailgun daemon is started the first time a formatting is requested. This can take a bit of time depending the machine and workload.
Once the daemon is running, next formatting task should execute faster.
The daemon is automatically shutdown when the plugin is reloaded, uninstalled or the editor is closed.