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 226
  • Win 91
  • Mac 77
  • Linux 58
Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13
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
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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 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.