Hi there!
Thanks for the guide! 
I am using Spacemacs and eglot. The guide is not totally accurate.
package-install is prohibited in Spacemacs.
-
You should add
eglotindotspacemacs-additional-packagesinstead. -
Then you need to add in
dotspacemacs/user-config:
(require 'eglot)
(add-to-list 'eglot-server-programs '(elixir-mode "/home/nicolas/elixir-ls/release/language_server.sh"))
- To make your life easier and not having to type
M-x eglotin any Elixir file, you may add indotspacemacs/user-configAFTER(require 'eglot):
(add-hook 'elixir-mode-hook 'eglot-ensure)
Lastly, three things:
- The
elixirlayer in Spacemacs does not play well with Eglot. It callslsp-modefrom the Spacemacslsplayer. If you want to useeglotin Spacemacs, you should add directlyelixir-modeindotspacemacs-additional-packages. Do not add theelixirlayer. - If you fail to add the
require 'eglotinstruction appropriately,eglotwill randomly stop working on Emacs restart, and you will be prompted the error described in this GitHub issue. - You can find my full .spacemacs dot file for more guidance on my GitHub.






















