Updating Doom Emacs.

This commit is contained in:
Derek Taylor
2020-06-19 22:43:40 -05:00
parent 0f664d532a
commit a5c86c514a
453 changed files with 13527 additions and 12455 deletions

View File

@@ -16,10 +16,10 @@
* Description
This module provides support for [[https://elixir-lang.org/][Elixir programming language]] via [[https://github.com/tonini/alchemist.el][alchemist.el]]
or [[https://github.com/JakeBecker/elixir-ls/][elixir-ls]].
or [[https://github.com/elixir-lsp/elixir-ls/][elixir-ls]].
** Module flags
+ ~+lsp~ Enable LSP support. Requires [[https://github.com/JakeBecker/elixir-ls/][elixir-ls]].
+ ~+lsp~ Enable LSP support. Requires [[https://github.com/elixir-lsp/elixir-ls/][elixir-ls]].
** Plugins
+ [[https://github.com/elixir-editors/emacs-elixir][elixir-mode]]
@@ -33,7 +33,7 @@ manager or a version management tool such as [[https://github.com/asdf-vm/asdf-e
If you want to add support for LSP ([[modules/tools/lsp][:tools lsp]]), be sure to install [[https://github.com/JakeBecker/elixir-ls/][elixir-ls]]
and enable ~:tools lsp~ in your ~init.el~.
To support linting with [[https://github.com/rrrene/credo][credo]], add ~:tools flycheck~ to your ~init.el~
To support linting with [[https://github.com/rrrene/credo][credo]], add ~:checkers syntax~ to your ~init.el~
** Install Elixir
*** With ~asdf~
#+BEGIN_SRC sh
@@ -59,4 +59,4 @@ sudo zypper install elixir
- Mix integration
- Phoenix support
- ~iex~ integration (~:tools eval~)
- Syntax checking (~:tools flycheck~, using [[https://github.com/aaronjensen/flycheck-credo][flycheck-credo]]~)
- Syntax checking (~:checkers syntax~, using [[https://github.com/aaronjensen/flycheck-credo][flycheck-credo]]~)

View File

@@ -37,31 +37,30 @@
(sp-local-pair "fn " " end" :unless '(sp-in-comment-p sp-in-string-p)))
(when (featurep! +lsp)
(add-hook 'elixir-mode-local-vars-hook #'lsp!))
(add-hook 'elixir-mode-local-vars-hook #'lsp!)))
(use-package! flycheck-credo
:when (featurep! :tools flycheck)
:config (flycheck-credo-setup)))
(use-package! flycheck-credo
:when (featurep! :checkers syntax)
:after elixir-mode
:config (flycheck-credo-setup))
(use-package! alchemist
:hook (elixir-mode . alchemist-mode)
:init
(after! elixir-mode
(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)))
:config
(set-lookup-handlers! 'alchemist-mode
:definition #'alchemist-goto-definition-at-point
:documentation #'alchemist-help-search-at-point)
(set-eval-handler! 'alchemist-mode #'alchemist-eval-region)
(set-repl-handler! 'alchemist-mode #'alchemist-iex-project-run))
(use-package! alchemist-company
:when (featurep! :completion company)
:commands alchemist-company
:init
(after! elixir-mode
(set-company-backend! 'elixir-mode '(alchemist-company company-yasnippet)))
: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)))))

View File

@@ -2,7 +2,7 @@
;;; lang/elixir/packages.el
;; +elixir.el
(package! elixir-mode)
(package! alchemist)
(when (featurep! :tools flycheck)
(package! flycheck-credo))
(package! elixir-mode :pin "231291ecad")
(package! alchemist :pin "6f99367511")
(when (featurep! :checkers syntax)
(package! flycheck-credo :pin "e88f11ead5"))