Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.
/ sublime-scalafmt Public archive

Scala formatter for Sublime Text 3, powered by Scalafmt and Nailgun

License

Notifications You must be signed in to change notification settings

fedragon/sublime-scalafmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scalafmt for Sublime Text 3

Minimal Sublime Text 3 package to format Scala files, powered by Scalafmt and Nailgun.

Installation

Step 1: Install this package

  • open the Command Palette
  • select Package Control: Install Package
  • select Scalafmt

... or manually

Clone this repository in ~/Library/Application Support/Sublime Text 3/Packages/.

Step 2: Install Scalafmt and Nailgun

Run provided setup.sh, that will install for you both Scalafmt and Nailgun according to recommended installation instructions.

Optional: Add keybinding

Open Preferences > Key Bindings and add:

{
  "keys": ["super+alt+l"],
  "command": "scalafmt_format_file",
}

changing keys to any sequence of keys you'd like.

Usage

Open a Scala file, then open the Command Palette and select Scalafmt: Format current file.

Customize format style

This package uses (and creates, if missing) ~/.scalafmt.conf: this file can be used to influence how scalafmt formats your code.

Caveats

Only developed and tested on macOS.

About

Scala formatter for Sublime Text 3, powered by Scalafmt and Nailgun

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published