Skip to content

Latest commit

 

History

History
130 lines (102 loc) · 5.24 KB

README.org

File metadata and controls

130 lines (102 loc) · 5.24 KB

Elixir layer

img/elixir.png with img/alchemist.png

Table of Contents

Description

This layer adds support for Elixir .

Alchemist brings the Elixir tooling to Emacs and comes with a bunch of features like:

  • Powerful IEx integration
  • Mix integration
  • Compile & Execution of Elixir code
  • Inline code evaluation
  • Documentation lookup
  • Definition lookup
  • Smart code completion
  • Elixir project management
  • Integration with company-mode

Install

To use this configuration layer, add it to your ~/.spacemacs. You will need to add elixir to the existing dotspacemacs-configuration-layers list in this file.

Key bindings

Refcard

You find and overview of all the key-bindings on the Alchemist-Refcard.

Help

Key BindingDescription
SPC m h :Run custom search for help
SPC m h hShow help of the current expression
SPC m h HToggle through search history
SPC m h rShow help for current region

Mix

Key BindingDescription
SPC m m :Prompt for a mix command
SPC m m cCompile the whole application
SPC m m hShow help for a specific mix command
SPC m m xRun the given expression in the Elixir application context

Project

Key BindingDescription
SPC m p tOpen project test directory and list all test files.
SPC m g tToggle between a file and its tests in the current window.
SPC m g TToggle between a file and its tests in other window.

Evaluation in place

Key BindingDescription
SPC m e bEvaluate buffer
SPC m e BEvaluate buffer and insert result
SPC m e lEvaluate current line
SPC m e LEvaluate current line and insert result
SPC m e rEvaluate region
SPC m e REvaluate region and insert result

REPL interactions

Key BindingDescription
SPC m s cCompiles the current buffer in the IEx process.
SPC m s iStart an iex inferior process
SPC m s IStart an IEx process with mix (iex -S mix)
SPC m s lSend current line to REPL buffer
SPC m s LSend current line to REPL buffer and focus it in insert state
SPC m s mReloads the module in the current buffer in your IEx process
SPC m s rSend region to REPL buffer
SPC m s RSend region to REPL buffer and focus it in insert state

Tests

Key BindingDescription
SPC m g tOpen the test file for current buffer
SPC m t aRun all the tests
SPC m t bRun all the tests from current buffer
SPC m t rRerun the last test
SPC m t tRun test under point

Compile

Key BindingDescription
SPC m c :Run a custom compile command with elixirc
SPC m c bCompile the current buffer with elixirc. elixirc
SPC m c fCompile the given filename with elixirc

Execute

Key BindingDescription
SPC m x :Run a custom execute command with elixir
SPC m x bRun the current buffer through elixir
SPC m x fRun elixir with the given filename

Code Definition Jump

Key BindingDescription
SPC m g gJump to the elixir expression definition at point.
SPC m ,Pop back to where SPC m g g was last invoked.