ScalafmtEnhanced
Sublime Text 3 plugin to invoke scalafmt, a code formatter for Scala.
Details
Installs
- Total 231
- Win 92
- Mac 80
- Linux 59
Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | Aug 18 | Aug 17 | Aug 16 | Aug 15 | Aug 14 | Aug 13 | Aug 12 | Aug 11 | Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | Aug 4 | Aug 3 | Aug 2 | Aug 1 | Jul 31 | Jul 30 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 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 | 1 |
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 | 1 | 0 | 2 | 1 | 1 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
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.