Skip to content

Commit 3a1a4c5

Browse files
authored
Add some installation instructions (#326)
1 parent dd09171 commit 3a1a4c5

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,42 @@ The original repository has now been deprecated in favor of this one. Any IDE ex
2626

2727
Note: On first run Dialyzer will build a PLT cache which will take a considerable amount of CPU time (usually 10+ minutes). After that is complete the CPU usage will go back to normal. Alternatively instead of waiting you can disable Dialyzer in the settings.
2828

29+
## Installation
30+
31+
How you install ElixirLS depends on your editor.
32+
33+
For VSCode install the extension: https://marketplace.visualstudio.com/items?itemName=JakeBecker.elixir-ls
34+
35+
### Emacs
36+
37+
Download the latest release:
38+
https://github.com/elixir-lsp/elixir-ls/releases/latest and unzip it into a
39+
directory (this is the directory referred to as the
40+
`"path-to-elixir-ls/release"` below)
41+
42+
If using `lsp-mode` add this configuration:
43+
```elisp
44+
(use-package lsp-mode
45+
:commands lsp
46+
:ensure t
47+
:diminish lsp-mode
48+
:hook
49+
(elixir-mode . lsp)
50+
:init
51+
(add-to-list 'exec-path "path-to-elixir-ls/release"))
52+
```
53+
54+
For eglot use:
55+
```elisp
56+
(require 'eglot)
57+
58+
;; This is optional. It automatically runs `M-x eglot` for you whenever you are in `elixir-mode`
59+
(add-hook 'elixir-mode-hook 'eglot-ensure)
60+
61+
;; Make sure to edit the path appropriately, use the .bat script instead for Windows
62+
(add-to-list 'eglot-server-programs '(elixir-mode "path-to-elixir-ls/release/language_server.sh"))
63+
```
64+
2965
## Supported versions
3066

3167
Elixir:

0 commit comments

Comments
 (0)