Back to Spacevim

SpaceVim lang#elixir layer

docs/layers/lang/elixir.md

2.4.02.0 KB
Original Source

Available Layers >> lang#elixir

<!-- vim-markdown-toc GFM --> <!-- vim-markdown-toc -->

Description

This layer is for Elixir development.

Features

This layer includes the plugin slashmili/alchemist.vim, which provides:

  • Completion for Modules and functions.
  • Documentation lookup for Modules and functions.
  • Jump to the definition.

SpaceVim also provides REPL, code runner and Language Server protocol support for Elixir. To enable language server protocol for Elixir, you need to load lsp layer for Elixir.

Install

Layer

To use this configuration layer, update your custom configuration file with:

toml
[[layers]]
  name = "lang#elixir"

Key bindings

Language specific key bindings

Key BindingsDescriptions
SPC l d / KShow doc of cursor symbol
SPC l tJump to tag stack
SPC l eRename symbol (need lsp layer)
g dJump to definition

Inferior REPL process

Start a iex inferior REPL process with SPC l s i.

Send code to inferior process commands:

Key BindingsDescriptions
SPC l s bsend buffer and keep code buffer focused
SPC l s lsend line and keep code buffer focused
SPC l s ssend selection text and keep code buffer focused

Running current script

To run the current script, you can press SPC l r to run the current file without losing focus, and the result will be shown in a runner buffer.