emacs: Switch to elixir-ts-mode and add lexical to eglot
This commit is contained in:
parent
181d0624dd
commit
767934e2d4
1 changed files with 15 additions and 13 deletions
|
@ -1109,11 +1109,15 @@ Automatically use the =<lang>-ts-mode= when it is available
|
||||||
(fset #'json--log-event #'ignore) ;; Performance boost by not logging every event
|
(fset #'json--log-event #'ignore) ;; Performance boost by not logging every event
|
||||||
(add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
'((toml-mode toml-ts-mode conf-toml-mode) . ("taplo" "lsp" "stdio")))
|
'((toml-mode toml-ts-mode conf-toml-mode) . ("taplo" "lsp" "stdio")))
|
||||||
|
;; (add-to-list 'eglot-server-programs
|
||||||
|
;; `((elixir-mode elixir-ts-mode heex-ts-mode) .
|
||||||
|
;; ,(eglot-alternatives '(("nextls" "--stdio=true"
|
||||||
|
;; :initializationOptions (:experimental (:completions (:enable t))))
|
||||||
|
;; "elixir-ls"))))
|
||||||
|
;;
|
||||||
(add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
`((elixir-mode elixir-ts-mode heex-ts-mode) .
|
`((elixir-ts-mode heex-ts-mode) .
|
||||||
,(eglot-alternatives '(("nextls" "--stdio=true"
|
,(eglot-alternatives '("lexical" "elixir-ls"))))
|
||||||
:initializationOptions (:experimental (:completions (:enable t))))
|
|
||||||
"elixir-ls"))))
|
|
||||||
(add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
'(dhall-mode . ("dhall-lsp-server")))
|
'(dhall-mode . ("dhall-lsp-server")))
|
||||||
(add-to-list 'eglot-stay-out-of 'flymake)
|
(add-to-list 'eglot-stay-out-of 'flymake)
|
||||||
|
@ -1283,22 +1287,20 @@ Prefer local packages from =node_modules= to global ones
|
||||||
|
|
||||||
Add support for Elixir with [[https://github.com/elixir-editors/emacs-elixir][elixir-mode]]. The =elixir-format= hook sets up the correct formatter configuration when in a =projectile= project.
|
Add support for Elixir with [[https://github.com/elixir-editors/emacs-elixir][elixir-mode]]. The =elixir-format= hook sets up the correct formatter configuration when in a =projectile= project.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp :tangle no
|
||||||
(use-package elixir-mode
|
(use-package elixir-mode
|
||||||
:after eglot
|
:after eglot
|
||||||
:hook ((elixir-mode . eglot-ensure))
|
:hook ((elixir-mode . eglot-ensure))
|
||||||
;; ((elixir-format . (lambda ()
|
|
||||||
;; (if (projectile-project-p)
|
|
||||||
;; (setq elixir-format-arguments
|
|
||||||
;; (list "--dot-formatter"
|
|
||||||
;; (concat (locate-dominating-file buffer-file-name ".formatter.exs") ".formatter.exs")))
|
|
||||||
;; (setq elixir-format-arguments nil))))
|
|
||||||
;; (elixir-mode . (lambda () (add-hook 'before-save-hook 'elixir-format nil t)))
|
|
||||||
:config
|
:config
|
||||||
;; (setq lsp-elixir-server-command '("elixir-ls"))
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.[hl]eex\\'" . elixir-mode)))
|
(add-to-list 'auto-mode-alist '("\\.[hl]eex\\'" . elixir-mode)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package elixir-ts-mode
|
||||||
|
:after eglot
|
||||||
|
:hook ((elixir-ts-mode . eglot-ensure)))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
Add a [[https://github.com/ayrat555/mix.el][mix]] minor mode to call =mix= tasks from emacs.
|
Add a [[https://github.com/ayrat555/mix.el][mix]] minor mode to call =mix= tasks from emacs.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
Loading…
Reference in a new issue