doomemacs/modules/lang/elixir
Henrik Lissner a70e634ebd
refactor(:lang): move tree-sitter init
Moved add-hook calls (for tree-sitter initialization) into their
respective modes' config blocks, or nearby, to be consistent with how
other, similar tools (like lsp!) are initialized, and does so at
runtime, rather than at expansion/compile time, which eval-when! caused.
2022-07-25 17:34:44 +02:00
..
config.el refactor(:lang): move tree-sitter init 2022-07-25 17:34:44 +02:00
doctor.el docs(tree-sitter): add doc checks for langs 2022-06-17 20:08:42 +01:00
packages.el bump: :lang 2022-03-31 21:09:38 +02:00
README.org Update Elixir Installation instructions (#4835) 2021-04-13 19:20:46 -04:00

lang/elixir

Description

This module provides support for Elixir programming language via alchemist.el or elixir-ls.

Module flags

  • +lsp Enable LSP support. Requires elixir-ls.

Prerequisites

You should have Elixir installed, for example, via your distribution's package manager or a version management tool such as asdf.

If you want to add support for LSP (:tools lsp), be sure to install elixir-ls and enable :tools lsp in your init.el.

To support linting with credo, add :checkers syntax to your init.el

Install Elixir

With asdf

asdf plugin-add elixir
asdf install elixir 1.9.1

Arch Linux

sudo pacman -S elixir

Gentoo Linux

sudo emerge -v dev-lang/elixir

openSUSE

sudo zypper install elixir

See https://elixir-lang.org/install.html for other operating systems

Features

  • Code completion (:completion company)
  • Documentation lookup (:tools lookup)
  • Mix integration
  • Phoenix support
  • iex integration (:tools eval)
  • Syntax checking (:checkers syntax, using flycheck-credo~)

Appendix

Commands

exunit-mode

The exunit-mode prefix is SPC m t. Here is some examples:

command key / ex command description
exunit-verify-all SPC m t a Runs exunit on all files
exunit-rerun SPC m t r Re-runs last exunit command
exunit-verify SPC m t v Runs exunit on current file
exunit-verify-single SPC m t s Runs exunit for the item on cursor
exunit-toggle-file-and-test SPC m t t Switch between implementation and test
exunit-toggle-file-and-test-other-window SPC m t T Switch between implementation and test in other window