Hello all,
I am working on an IEx package (using a lot of the code form the Term 2 plugin) for the Atom editor. The basic functionality is working now (starting IEx in a tab and interacting with it), but I want to add interaction from within other editor tabs/panes (executing code, reloading/restarting the project, running tests, etc.). I have been using the Clojure REPL in Sublime Text for some time now and I would really like to duplicate as much of that functionality as possible.
I have read
this thread about executing mix commands in IEx and I can execute simple mix commands, but I am having trouble with more complicated interactions (no doubt due to my limited Elixir knowledge). I have read the Mix API documentation, but I could use some help. In particular, how can one reload and restart an application in IEx (via invoking mix commands or otherwise). I am okay if this involves adding custom code to mix.exs. The only real limitation I have is I would not want to have to restart IEx unless absolutely necessary.
I could use help with the other interactions (particularly running tests), but reloading is the main one. Ideally I would be able to provide a key binding (e.g., alt+cmd+R) that would reload the project in an open IEx session. Other interactions would have their own bindings, e.g., alt+cmd+X to run all the tests.
Any help or advice would be greatly appreciate, and feel free to suggest any interactions that would be useful to Elixir developers.
Thanks,
James