Skip to content

Instantly share code, notes, and snippets.

@walter
Created October 29, 2016 02:37
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 walter/6911d710ae176b81f06b2750a7a60338 to your computer and use it in GitHub Desktop.
Save walter/6911d710ae176b81f06b2750a7a60338 to your computer and use it in GitHub Desktop.
(defun alchemist-iex-project-run-phoenix-server ()
"Start an IEx process with mix 'iex -S mix phoenix.server' in the
context of an Elixir project.
Show the IEx buffer if an IEx process is already run."
(interactive)
(if (alchemist-project-p)
(let ((default-directory (alchemist-project-root)))
(pop-to-buffer (process-buffer (alchemist-iex-process " -S mix phoenix.server"))))
(message "No mix.exs file available. Please use `alchemist-iex-run' instead.")))
(define-key alchemist-mode-keymap (kbd "i s") 'alchemist-iex-project-run-phoenix-server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment