michaelb/sniprun

Elixir support

NikitaNaumenko opened this issue · 4 comments

Describe the language you want support for (compiler, specificities)
How about add Elixir language?
Support Level to achieve
Simple REPL operation

Sure, I'll get a look at it during the holidays. If we're lucky REPL support won't be an issue

Stuff has been done, but I'm way too little proficient in Elixir to really understand what's normal and what's not.

You can try it out if you want (with REPL support, but disabled by default) on the dev branch (you'll need the Rust toolchain)
(packer example)

      use {
         "michaelb/sniprun",
         branch = "dev",
         run = "bash install.sh 1"
     }

Non-repl works great IMO, but due do shenanigans with iex, the elixir interpreter, REPL mode has tendencies to output a lot more than it should.
If you have any idea for reducing iex 's verbosity, or coding filters like the ones that remove :ok (Elixir_original.rs line 46), I'm taking suggestions

Thanks a lot it works great, but if it cat support mix option it would be great e.g when we run iex -S mix we compile current mix project and project functions and modules become available, current when I run :SnipRun in iex, there's available only stdlib functions, like String.length(), Map.merge().
I'm not sure that verbosity can be reduced, could you give examples when repl output more than it should

Given Elixir supports now works and is basically on feature parity with support for other languages, I'm closing this issue.

If support of the "mix" option (keep in mind that I have basically 0 experience with the Elixir ecosystem) is of importance (similarly to Julia's --project option for example, see #199 ), I'd suggest you to open a separate issue.

We'll discuss there what we can do, and whether the solution creates new dependencies or bugs that would need documentation