doomemacs/modules/lang/elixir
Henrik Lissner 6acf163cf7
refactor!: replace smartparens with electric
BREAKING CHANGE: This moves smartparens out of core and formally
deprecates it. The package has been a performance liability and is only
being used for pair management, so the rest of its functionality was
overkill for what we needed it for.

Instead, I'm waiting for electric.el's support for N-character pairs in
Emacs 31. In the meantime, I delegate to yasnippet (later, tempel)
snippets to handle more complex pairs like /* ... */ or <?php ... ?>.

- To restore auto-pairing functionality (which is all Doom was using
  smartparens for, really), enable :emacs (electric +pair). This is not
  a perfect replacement for all of smartparens' capabilities. More
  complex pairing is being relegated to snippets (for example, /* ... */
  and <?php ... ?> comment blocks will soon have snippets for them).

- To restore the old smartparens functionality, enable :config (default
  +smartparens). Keep in mind that this is temporary! In v3, smartparens
  will be removed entirely OR moved to its own module; this hasn't been
  decided yet.

Fix: #5759
Fix: #5894
Fix: #6223
Fix: #8093
Fix: #8620
2026-02-21 17:00:48 -05:00
..
.doommodule feat: add .doommodule files 2024-09-14 20:47:39 -04:00
config.el refactor!: replace smartparens with electric 2026-02-21 17:00:48 -05:00
doctor.el feat(elixir): add treesit support 2025-05-22 18:32:03 +02:00
packages.el bump: :lang 2026-02-13 16:31:15 -05:00
README.org feat(elixir): add treesit support 2025-05-22 18:32:03 +02:00

:lang elixir

Description   unfold

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

Maintainers

This module has no dedicated maintainers. Become a maintainer?

Module flags

+lsp
Enable LSP support for elixir-mode. Requires doom-module::tools lsp and a langserver (supports elixir-ls).
+tree-sitter
Leverages tree-sitter for better syntax highlighting and structural text editing. Requires Emacs 30.1+ and doom-module::tools tree-sitter.

Hacks

No hacks documented for this module.

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

This module requires Elixir. Install it via your distribution's package manager or a version management tool such as asdf.

To add LSP support, install elixir-ls and enable doom-module::tools lsp.

To support linting with credo, add :checkers syntax to $DOOMDIR/init.el.

Install Elixir

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

With asdf

asdf plugin-add elixir
asdf install elixir 1.9.1

Arch Linux

pacman -S elixir

Gentoo Linux

emerge -v dev-lang/elixir

openSUSE

zypper install elixir

TODO Usage

󱌣 This module's usage documentation is incomplete. Complete it?

  • Code completion (doom-module::completion company)
  • Documentation lookup (doom-module::tools lookup)
  • Mix integration
  • Phoenix support
  • iex integration (doom-module::tools eval)
  • Syntax checking (doom-module::checkers syntax, using doom-package:flycheck-credo)
  • Formatting for elixir files provided by doom-module::editor format.

exunit-mode

The exunit-mode prefix is <localleader> t. Here is some examples:

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

TODO Configuration

󱌣 This module has no configuration documentation yet. Write some?

Troubleshooting

There are no known problems with this module. Report one?

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

󱌣 This module has no appendix yet. Write one?