working emacs config for elixir

This commit is contained in:
Willem van den Ende
2023-03-28 14:27:01 +01:00
parent 293f65e21a
commit da0032b48b
4 changed files with 36 additions and 8 deletions
+22
View File
@@ -413,3 +413,25 @@ the description. This may destroy existing links, or change their targets so use
"Insert node immediate, don't open buffer on new node" "Insert node immediate, don't open buffer on new node"
"n r I" "n r I"
#'org-roam-node-insert-immediate) #'org-roam-node-insert-immediate)
;; elixir - eglot
;; eglot configuration
(use-package elixir-mode)
(use-package eglot)
(use-package exunit)
(add-to-list
'eglot-server-programs
'(elixir-mode . ("sh" "/opt/homebrew/bin/elixir-ls")))
(add-hook
'elixir-mode-hook
(lambda ()
(subword-mode)
(eglot-ensure)
(company-mode)
(flymake-mode)
(add-hook 'before-save-hook 'eglot-format nil t)
))
(setq inf-elixir-project-command "iex -S mix phx.server")
+2 -2
View File
@@ -97,7 +97,7 @@
(eval +overlay) ; run code, run (also, repls) (eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists ;;gist ; interacting with github gists
(lookup -org) ; navigate your code and its documentation (lookup -org) ; navigate your code and its documentation
lsp (lsp +peek)
(magit -gitflow) ; a git porcelain for Emacs (magit -gitflow) ; a git porcelain for Emacs
;;make ; run make tasks from Emacs ;;make ; run make tasks from Emacs
;;pass ; password manager for nerds ;;pass ; password manager for nerds
@@ -123,7 +123,7 @@
;;csharp ; unity, .NET, and mono shenanigans ;;csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats ;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else ;;(dart +flutter) ; paint ui and not much else
elixir ; erlang done right ;; (elixir +lsp) ; erlang done right
;;elm ; care for a cup of TEA? ;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age ;;erlang ; an elegant language for a more civilized age
+6
View File
@@ -15,6 +15,12 @@
(package! exec-path-from-shell) (package! exec-path-from-shell)
(package! elisp-autofmt) (package! elisp-autofmt)
(package! pair-tree) (package! pair-tree)
;; elixir
;;
(package! elixir-mode)
(package! eglot)
(package! exunit)
(package! inf-elixir)
;; craft of emacs ;; craft of emacs