doomemacs/modules/lang/elixir/README.org

105 lines
3.9 KiB
Org Mode
Raw Normal View History

#+title: :lang elixir
#+subtitle: Erlang done right
#+created: May 24, 2017
#+since: 2.0.3 (#83)
* Description :unfold:
This module provides support for [[https://elixir-lang.org/][Elixir programming language]] via [[https://github.com/elixir-lsp/elixir-ls/][elixir-ls]].
** Maintainers
/This module has no dedicated maintainers./ [[doom-contrib-maintainer:][Become a maintainer?]]
2019-07-26 21:23:32 +03:00
2019-07-26 22:14:07 +03:00
** Module flags
- +lsp ::
2022-09-26 02:19:42 +08:00
Enable LSP support for ~elixir-mode~. Requires [[doom-module::tools lsp]] and a langserver
(supports [[https://github.com/elixir-lsp/elixir-ls/][elixir-ls]]).
- +tree-sitter ::
Leverages tree-sitter for better syntax highlighting and structural text
2022-09-26 02:19:42 +08:00
editing. Requires [[doom-module::tools tree-sitter]].
** Packages
2022-09-26 02:19:42 +08:00
- [[doom-package:elixir-mode]]
- [[doom-package:exunit]]
- [[doom-package:flycheck-credo]] if [[doom-module::checkers syntax]]
** Hacks
/No hacks documented for this module./
2019-07-26 22:14:07 +03:00
** TODO Changelog
# This section will be machine generated. Don't edit it by hand.
/This module does not have a changelog yet./
2019-06-24 19:55:27 +03:00
* Installation
[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]]
2019-07-26 21:23:32 +03:00
This module requires Elixir. Install it via your distribution's package manager
or a version management tool such as [[https://github.com/asdf-vm/asdf-elixir][asdf]].
2022-09-26 02:19:42 +08:00
To add LSP support, install [[https://github.com/JakeBecker/elixir-ls/][elixir-ls]] and enable [[doom-module::tools lsp]].
To support linting with [[https://github.com/rrrene/credo][credo]], add ~:checkers syntax~ to ~$DOOMDIR/init.el~.
2019-07-26 21:23:32 +03:00
** Install Elixir
(See [[https://elixir-lang.org/install.html]] for other operating systems)
2019-06-24 19:55:27 +03:00
*** With ~asdf~
#+begin_src sh
2019-06-24 19:55:27 +03:00
asdf plugin-add elixir
2019-07-26 21:23:32 +03:00
asdf install elixir 1.9.1
#+end_src
2019-06-24 19:55:27 +03:00
*** Arch Linux
#+begin_src sh
pacman -S elixir
#+end_src
2019-06-24 19:55:27 +03:00
*** Gentoo Linux
#+begin_src sh
emerge -v dev-lang/elixir
#+end_src
*** openSUSE
#+begin_src sh
zypper install elixir
#+end_src
* TODO Usage
#+begin_quote
󱌣 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote
2022-09-26 02:19:42 +08:00
- Code completion ([[doom-module::completion company]])
- Documentation lookup ([[doom-module::tools lookup]])
2019-07-26 21:23:32 +03:00
- Mix integration
- Phoenix support
2022-09-26 02:19:42 +08:00
- ~iex~ integration ([[doom-module::tools eval]])
- Syntax checking ([[doom-module::checkers syntax]], using [[doom-package:flycheck-credo]])
2022-10-05 12:36:59 +01:00
- Formatting for elixir files provided by [[doom-module::editor format]].
** exunit-mode
The exunit-mode prefix is [[kbd:][<localleader> t]]. Here is some examples:
| command | key / ex command | description |
|--------------------------------------------+-------------------+--------------------------------------------------------|
| ~exunit-verify-all~ | [[kbd:][<localleader> t a]] | Runs exunit on all files |
| ~exunit-rerun~ | [[kbd:][<localleader> t r]] | Re-runs last exunit command |
| ~exunit-verify~ | [[kbd:][<localleader> t v]] | Runs exunit on current file |
| ~exunit-verify-single~ | [[kbd:][<localleader> t s]] | Runs exunit for the item on cursor |
| ~exunit-toggle-file-and-test~ | [[kbd:][<localleader> t t]] | Switch between implementation and test |
| ~exunit-toggle-file-and-test-other-window~ | [[kbd:][<localleader> t T]] | Switch between implementation and test in other window |
* TODO Configuration
#+begin_quote
󱌣 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]]
#+end_quote
* Troubleshooting
/There are no known problems with this module./ [[doom-report:][Report one?]]
* Frequently asked questions
/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]]
* TODO Appendix
#+begin_quote
󱌣 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote