elixir-ls
git clone https://github.com/elixir-lsp/elixir-ls.git elixir-ls pushd elixir-ls git checkout v0.17.10 # or some other release mix deps.get MIX_ENV=prod mix compile MIX_ENV=prod mix elixir_ls.release2 -o release popd
Then a language server script file should have been created under elixir-ls/release/language_server.sh
.
Add the following things to your =init.el=:
(use-package elixir-mode :ensure t) (use-package alchemist :ensure t)
;;; LSP (require 'eglot) ;; This is optional. It automatically runs `M-x eglot` for ;; you whenever you are in `elixir-mode` (add-hook 'elixir-mode-hook 'eglot-ensure) (add-to-list 'eglot-server-programs `(elixir-mode "~/.guix-extra-profiles/emacs-env/elixir-ls/release/language_server.sh"))
Some configuration that makes company run and a few shortcuts.
(use-package company :ensure t :init (setq company-show-numbers t) (setq company-idle-delay t) (setq company-require-match nil) (setq company-tooltip-idle-delay nil) (setq company-tooltip-maximum-width 120) (setq company-tooltip-minimum 3) (setq company-tooltip-align-annotations t) :config (define-key company-mode-map (kbd "C-") 'company-complete) (define-key company-active-map (kbd "C-n") 'company-select-next) (define-key company-active-map (kbd "C-p") 'company-select-previous) )