Skip to content

Commit

Permalink
Add instructions to use lexical as lsp for elixir
Browse files Browse the repository at this point in the history
see #16219 for details
  • Loading branch information
smile13241324 committed Jan 3, 2024
1 parent 9fc4ff2 commit 3292ba1
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions layers/+lang/elixir/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -152,23 +152,25 @@ Then run in your shell:

** Language server protocol
The =lsp= backend uses [[https://github.com/JakeBecker/elixir-ls][elixir-ls]] as its language server implementation
Clone the project to your system and follow the building instructions [[https://github.com/JakeBecker/elixir-ls#building-and-running][here]]
Or the lsp-elixir [[https://github.com/elixir-lsp/elixir-ls][fork]], which is actively maintained as well
Clone the project to your system and follow the building instructions [[https://github.com/JakeBecker/elixir-ls#building-and-running][here]].
Or the lsp-elixir [[https://github.com/elixir-lsp/elixir-ls][fork]], which is actively maintained as well.
A third choice would be [[https://github.com/lexical-lsp/lexical][lexical]] which is said to be working especially well in bigger projects.
For all of these some config must be applied in your dotfile.

set the =elixir-ls-path= to the release folder of =elixir-ls= in .spacemacs =dotspacemacs/user-config=
For =elixir-ls= this would be:

#+BEGIN_SRC elisp
(setq elixir-ls-path "*path to folder*/elixir-ls/release")
(elixir :variables elixir-backend 'lsp
elixir-ls-path "*path to folder*/elixir-ls/release")
#+END_SRC

or in the layer definition
For =lexical= this would be:

#+BEGIN_SRC elisp
(elixir :variables elixir-backend 'lsp elixir-ls-path "*path to folder*/elixir-ls/release")
(elixir :variables elixir-backend 'lsp
lsp-elixir-server-command "*path to folder*/lexical/bin/start_lexical.sh")
#+END_SRC

by default =elixir-ls-path= is equal to ="~/elixir-ls/release"=

** Debugger
For =lsp= backend only

Expand Down

0 comments on commit 3292ba1

Please sign in to comment.