Atom Plugins for Elm
I haven’t used Elm since version 0.12. During my vacation, I wanted to get a deeper dive into the effort people have put into it since then. Elm’s compiler is great at identifying errors in your code, but it happened after I tried to run my code or use elm-make on it.
Below are some of the plugins I found useful when writing Elm:
language-elm
language-elm provides syntax highlighting and snippets. It forms the basis for every other plugin described.
apm install language-elmelm-format

elm-format is like gofmt in that it formats Elm source code according to a standard set of rules based on the official Elm Style Guide. Installing the apm package is not enough though, you need to install the tool. I’d recommend using the following brew command which grabs the recipe from the homebrew-devel tap.
brew install homebrew/devel-only/elm-format --develThe recipe by default installs elm-format for the last three(?) versions of Elm. We will need to create a symlink so that the atom package calls out to the right binary.
# Remember to substitute the version number if >= 0.19 is out
ln -s "$(brew --prefix)/bin/elm-format-0.18" /usr/local/bin/elm-formatOnce installed, Elm code will format to match the styling guide on save.
apm install elm-formatlinter-elm-make

linter-elm-make brings in helpful error messages to Atom. It has options to lint as you type or on save.
Autocompletion
To enable autocompletion, we will need to install elm-oracle via npm. elm-oracle queries for information about values in Elm source files. I’d recommend to install it globally via [Yarn][yarn]:
yarn global add elm-oracleelmjutsu
Once elm-oracle is available, we will need elmjutsu to enable proper autocomplete.
apm install elmjutsuAfter installing elmjutsu, we need to disable autocomplete for language-elm and enable it for elmjutsu.
No comments yet. Share on Mastodon and see your comment or write a post on your blog if you support Webmentions
No reposts yet. Share on Mastodon and see your repost or write a post on your blog if you support Webmentions
No likes yet. Share on Mastodon and see your like or write a post on your blog if you support Webmentions
No bookmarks yet. Share on Mastodon and see your bookmark or write a post on your blog if you support Webmentions
Powered by Webmentions