Difference between revisions of "Elixir"
(Elixir !) |
m (note that exunit.el is in MELPA) |
||
(One intermediate revision by the same user not shown) | |||
Line 9: | Line 9: | ||
[https://github.com/elixir-lang/emacs-elixir elixir-mode] (in melpa) provides syntax highlighting, indentation and navigation support. More tooling come with Alchemist. | [https://github.com/elixir-lang/emacs-elixir elixir-mode] (in melpa) provides syntax highlighting, indentation and navigation support. More tooling come with Alchemist. | ||
+ | |||
+ | = inf-elixir = | ||
+ | |||
+ | Like most inf-* packages, [https://github.com/J3RN/inf-elixir/ inf-elixir] (in melpa) provides an easy way to open an Elixir REPL (IEx shell) either in the context of a project or independent from any. | ||
+ | |||
+ | = exunit.el = | ||
+ | |||
+ | [https://github.com/ananthakumaran/exunit.el exunit.el] (in melpa) provides an easy way to run tests in a mix project. | ||
= Alchemist - Elixir tooling = | = Alchemist - Elixir tooling = | ||
Line 28: | Line 36: | ||
* Integration with company-mode (completion framework) | * Integration with company-mode (completion framework) | ||
− | It adds an Alchemist menu and it has [https://alchemist.readthedocs.io/en/latest/ documentation]. | + | It adds an Alchemist menu and it has [https://alchemist.readthedocs.io/en/latest/ documentation]. However, Alchemist has not been updated in over three years, and has many known issues. |
Alchemist works as a server & client model, where the Alchemist server is written in Elixir and Emacs takes the part of the client. For each Elixir mix project Alchemist starts an independent server in the background. If an Elixir file gets opened in a buffer, Alchemist checks if a server is running for the current project or not and starts a new one if needed. If there is no Elixir mix project found, Alchemist starts a general unique server. | Alchemist works as a server & client model, where the Alchemist server is written in Elixir and Emacs takes the part of the client. For each Elixir mix project Alchemist starts an independent server in the background. If an Elixir file gets opened in a buffer, Alchemist checks if a server is running for the current project or not and starts a new one if needed. If there is no Elixir mix project found, Alchemist starts a general unique server. |
Latest revision as of 21:43, 21 April 2021
Elixir support in Emacs is pretty good ! How can we turn Emacs as an Elixir IDE ?
"Emacs has the best integration and best code completion (with alchemist) but it is emacs, and is only really great if you are comfortable with it."[a redditer]
Also note that Spacemacs ships an Elixir layer.
Elixir-mode - the basics
elixir-mode (in melpa) provides syntax highlighting, indentation and navigation support. More tooling come with Alchemist.
inf-elixir
Like most inf-* packages, inf-elixir (in melpa) provides an easy way to open an Elixir REPL (IEx shell) either in the context of a project or independent from any.
exunit.el
exunit.el (in melpa) provides an easy way to run tests in a mix project.
Alchemist - Elixir tooling
Alchemist (in melpa) features:
- Mix integration (prompt for a command, with completion of the available ones, compile the project, run the expression in contect,…)
- Mix Hex integration (get package info, show dependencies, search packages,…)
- Testing (run the test suite, the last test, the test at point, …)
- Compile & Execution of Elixir code
- Inline code evaluation
- Inline macro expanding
- Documentation lookup
- Definition lookup
- Powerful IEx integration
- Smart code completion
- Elixir project management
- Phoenix support (list all files/controllers/channels/etc)
- Integration with company-mode (completion framework)
It adds an Alchemist menu and it has documentation. However, Alchemist has not been updated in over three years, and has many known issues.
Alchemist works as a server & client model, where the Alchemist server is written in Elixir and Emacs takes the part of the client. For each Elixir mix project Alchemist starts an independent server in the background. If an Elixir file gets opened in a buffer, Alchemist checks if a server is running for the current project or not and starts a new one if needed. If there is no Elixir mix project found, Alchemist starts a general unique server.
Editing templates
web-mode works well to edit eex templates.