refactor!(elixir): remove alchemist

BREAKING CHANGE: alchemist appears to be unmaintained and has reportedly
been replaced by elixir-ls and LSP (#5488). To restore your Elixir dev
environemnt, enable :lang (elixir +lsp) and install elixir-ls via your
package manager or 'M-x lsp-install-server'.

Close: #5488
This commit is contained in:
Henrik Lissner 2023-03-22 17:03:12 -04:00
parent 890f200b41
commit 221e75e739
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
3 changed files with 1 additions and 37 deletions

View file

@ -56,39 +56,6 @@
:config (flycheck-credo-setup))
(use-package! alchemist
:hook (elixir-mode . alchemist-mode)
:config
(set-lookup-handlers! 'elixir-mode
:definition #'alchemist-goto-definition-at-point
:documentation #'alchemist-help-search-at-point)
(set-eval-handler! 'elixir-mode #'alchemist-eval-region)
(set-repl-handler! 'elixir-mode #'alchemist-iex-project-run)
(map! :after elixir-mode
:localleader
:map elixir-mode-map
"m" #'alchemist-mix
"c" #'alchemist-mix-compile
"i" #'alchemist-iex-project-run
"f" #'elixir-format
(:prefix ("e" . "eval")
"e" #'alchemist-iex-send-last-sexp
"r" #'alchemist-iex-send-region
"l" #'alchemist-iex-send-current-line
"R" #'alchemist-iex-reload-module)))
(use-package! alchemist-company
:when (modulep! :completion company)
:commands alchemist-company
:config
(set-company-backend! 'alchemist-mode '(alchemist-company company-yasnippet))
;; Alchemist doesn't use hook symbols to add these backends, so we have to use
;; the entire closure to get rid of it.
(let ((fn (byte-compile (lambda () (add-to-list (make-local-variable 'company-backends) 'alchemist-company)))))
(remove-hook 'alchemist-mode-hook fn)
(remove-hook 'alchemist-iex-mode-hook fn)))
(use-package! exunit
:hook (elixir-mode . exunit-mode)
:init