From 3292ba1cdf4963dfa1cd3c4724e6a05bbd2c8e98 Mon Sep 17 00:00:00 2001 From: Maxi Wolff Date: Wed, 3 Jan 2024 17:15:12 +0100 Subject: [PATCH] Add instructions to use lexical as lsp for elixir see #16219 for details --- layers/+lang/elixir/README.org | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/layers/+lang/elixir/README.org b/layers/+lang/elixir/README.org index b8e4d1f311ad..fff8d9cdb791 100644 --- a/layers/+lang/elixir/README.org +++ b/layers/+lang/elixir/README.org @@ -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