ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Scalafmt​Enhanced

by nitrotm ST3

Sublime Text 3 plugin to invoke scalafmt, a code formatter for Scala.

Details

Installs

  • Total 65
  • Win 27
  • Mac 20
  • Linux 18
Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14
Windows 1 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 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 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 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 0 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

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.