Elm mode for EMACS.
- Syntax highlighting.
- Intelligent indentation.
- Integration with elm-make.
- Integration with elm-repl.
- Integration with elm-reactor.
elm-mode
indentation is based on cycling: every time you insert a new
line there will be one or more indentation levels available for you to
choose from. The exact number is printed in the minibuffer either as
Sole indentation
or Indent cycle (n)...
where n
is the number of
available indentations to choose from. If the automatic indentation
level was not the one you expected simply hit TAB
to cycle through the
list (note that hitting any other key will cancel the cycle).
If your Emacs has package.el
(which is automatically the case
for Emacs >= 24), you can install elm-mode
from the package in
MELPA.
Add this repo to your load-path and (require 'elm-mode)
. Ensure that
the following dependencies are available:
This package assumes you are runing Emacs 24 or later.
The following bindings are available in elm-mode
:
elm-make
bindings:
C-c C-c
- Compile the current buffer.
C-c M-c
- Compile the
Main.elm
file.
elm-repl
bindings:
C-c C-l
- Load the current file in a REPL.
C-c C-p
- Push the current region to a REPL.
C-c C-e
-
Push the current declaration to a REPL (requires
haskell-mode
to be available -- highly experimental).
elm-reactor
bindings:
C-c C-n
- Preview the current buffer in a browser.
C-c C-m
- Preview the
Main.elm
file in a browser. C-u C-c C-n
- Preview the current buffer in a browser in debug mode.
C-u C-c C-m
- Preview the
Main.elm
file in a browser in debug mode.