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.
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!
Package Control: Install Package
in the Command Palette (Super+Shift+P)npm i -g elm
)git clone https://github.com/elm-community/SublimeElmLanguageSupport.git 'Elm Language Support'
case
… of
, let
… in
, etc.)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) |
elm-package.json
file (requires elm-oracle, which you can install with npm install -g elm-oracle
)
alt+up
or through the right-click context menualt+down
Build
just checks errors. Kudos to this tweet!Run
additionally outputs your compiled program to an inferred path.elm-package.json
or Elm Build System: …
in the Command Palette. Elm build system only requires a valid config in any ancestor directory of the active file. elm-repl
in an editor tab with syntax highlighting. elm-format
is in your PATH"elm_format_on_save": true
elm-format
on, for example elm-css based files, you can set a regex filter which will search the full filename (including the path to the file). If the regex matches, then it will not automatically run elm-format
on the file when you save. For example, the following filter would prevent automatic elm-format
on a file named elm-css/src/Css/TopBar.elm
:
"elm_format_filename_filter": "elm-css/src/Css/.*\\.elm$"
elm-oracle
installed, but completions, type signature display, and the type panel don't work
elm-oracle
is on your PATH, orelm-oracle
to the elm_paths
setting in your Elm Language Support User settingselm-format
installed, but it's not working
elm-format
is on your PATH, orelm-format-0.17
or elm-format-0.18
) add it to the elm_format_binary
setting in your Elm Language Support User settings; an example might be "elm_format_binary": "elm-format-0.18",
, orelm-format
to the elm_paths
setting in your Elm Language Support User settings. Note that you can combine paths with the above, so an example might be "elm_paths": "/users/alex/elm-format:/users/alex/elm-oracle"
elm-format
on, for example elm-css based files, you can set a regex filter which will search the full filename (including the path to the file). If the regex matches, then it will not automatically run elm-format
on the file when you save. For example, the following filter would prevent automatic elm-format
on a file named elm-css/src/Css/TopBar.elm
:
"elm_format_filename_filter": "elm-css/src/Css/.*\\.elm$"
Don't know Elm? Great first step!