   (sm/set-goto-def-keybind 'elixir-mode-map #'lsp-find-definition)
 
   :hook ((elixir-mode . lsp)
-         (before-save . sm/elixir-format-on-save))
+         (elixir-mode . sm/set-elixir-format-hook))
   :bind(:map elixir-mode-map
              ("C-c C-d" . lsp-describe-thing-at-point)
              ("C-c r r" . lsp-rename)

  :straight t
  :defer t
  :init
  (defun sm/elixir-format-on-save ()
    (when (eq major-mode 'elixir-mode)
      (elixir-format)))

  (defvar sm/iex-name "iex"
    "Command for iex.")

  :defer t
  :commands gofmt
  :init
  (defun sm/set-gofmt-hook ()
    (add-hook 'before-save-hook #'gofmt nil t))
  :config
  (setq gofmt-command "goimports"
        gofmt-args '("-local=coder.com,cdr.dev,go.coder.com,github.com/cdr"))
