     (flycheck-remove-next-checker 'lsp 'golangci-lint))
 
   :hook ((go-mode . lsp)
-         (before-save . seanmacs/gofmt-before-save))
+         (go-mode . sm/set-gofmt-hook))
   :bind(:map go-mode-map
              ("C-c C-d" . lsp-describe-thing-at-point)
              ("C-c r r" . lsp-rename)))

  :defer t
  :commands gofmt
  :init
  (defun seanmacs/gofmt-before-save ()
    (when (eq major-mode 'go-mode)
      (gofmt)))
  :config
  (setq gofmt-command "goimports"
        gofmt-args '("-local=coder.com,cdr.dev,go.coder.com,github.com/cdr"))

  :straight t
  :defer t
  :init
  (defun sm/set-elixir-format-hook ()
    (add-hook 'before-save-hook #'elixir-format nil t))

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