Skip to content

Instantly share code, notes, and snippets.

@seancribbs
Created September 28, 2018 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seancribbs/22af482717e6211f834bd63f21ddc65a to your computer and use it in GitHub Desktop.
Save seancribbs/22af482717e6211f834bd63f21ddc65a to your computer and use it in GitHub Desktop.
;; Support mix format command
(defun alchemist-mix-format (&optional prefix)
"Runs mix format in the project"
(interactive)
(alchemist-mix-execute (list "format") prefix))
(defun alchemist-mix-format-buffer (&optional prefix)
"Runs mix format on the current buffer"
(interactive)
(alchemist-mix-execute (list "format" (buffer-file-name)) prefix))
(eval-after-load "alchemist-mix"
(spacemacs/set-leader-keys-for-major-mode 'elixir-mode
"fa" 'alchemist-mix-format
"fb" 'alchemist-mix-format-buffer))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment