elm-community / SublimeElmLanguageSupport

Elm language syntax highlighting and tool integration for ST2/3.
https://packagecontrol.io/packages/Elm%20Language%20Support
MIT License
33 stars 12 forks source link

This project is deprecated. The official Elm language support package for Sublime Text is evancz/elm-syntax-highlighting, with elm-format support available via evancz/elm-format-on-save.

Elm Language Support logo

The Sublime Elm Language Package

Note: Elm 0.19 and Elm Language Support

Elm 0.19 was recently released. It makes major, breaking changes to the compiler's interface with packages like this one. It is likely the next release of Elm Language Support will break compatibility with Elm 0.18.

If you plan to remain on Elm 0.18 for now, you should configure Package Control to ignore updates to this package until you are ready to upgrade. In Sublime Text, choose Preferences > Package Settings > Package Control > Settings – User, then add this setting to your Package Control.sublime-settings file:

{
  "auto_upgrade_ignore": [
    "Elm Language Support"
  ],
}

Upgrading to Elm 0.19

A pre-release version of this package with experimental support for Elm 0.19 is available. If you're using Elm 0.19 already, we'd value your feedback!

Warning: This new version does not support Elm 0.18!

To upgrade, configure Package Control to install pre-release versions of this package. In Sublime Text, choose Preferences > Package Settings > Package Control > Settings – User, then add this setting to your Package Control.sublime-settings file:

{
  "install_prereleases":
  [
    "Elm Language Support"
  ],
}

Then use the Package Control: Upgrade Package command in the Command Palette to upgrade. Make sure to read the release notes that are displayed following the upgrade!

Installation

  1. Install Package Control
  2. Run Package Control: Install Package in the Command Palette (Super+Shift+P)
  3. Install Elm or use NPM (npm i -g elm)

Manual

  1. Go to Packages directory
  2. Clone the repository git clone https://github.com/elm-community/SublimeElmLanguageSupport.git 'Elm Language Support'

Features

Tab Trigger Description
cof case … of
cofm case … of (Maybe)
cofr case … of (Result)
debug Debug.log
fn Function (a -> b)
fn2 Function (a -> b -> c)
fn3 Function (a -> b -> c -> d)
fn4 Function (a -> b -> c -> d -> e)
imp import
impas import … as
let let … in …
mod module
type type
typea type alias (Record)

Troubleshooting

Learning

Don't know Elm? Great first step!