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

  • 1.0.1
  • github.​com
  • github.​com
  • 5 months ago
  • 21 minutes ago
  • 3 months ago

Installs

  • Total 22
  • Win 9
  • OS X 6
  • Linux 7
May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8
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 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0
OS X 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 0 0 0 0 0 0 0 2 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 1 0 0 0 0 0 0 0 0 0 0 1 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.