Skip to content

bsermons/elm-mode

 
 

Repository files navigation

elm-mode

Elm mode for EMACS.

Features

  1. Syntax highlighting.
  2. Intelligent indentation.
  3. Integration with elm-make.
  4. Integration with elm-repl.
  5. Integration with elm-reactor.

Indentation

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).

Installation

MELPA

If your Emacs has package.el (which is automatically the case for Emacs >= 24), you can install elm-mode from the package in MELPA.

From source

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.

Bindings

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.

About

Elm mode for emacs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%