The syntax checker for elixir (.ex files) breaks the livereloading feature of the popular phoenix framework. (See this issue)
The atom editor fixed this problem by using elixirc rather than mix compile. See this PR.
I believe this could be implemented relatively easily by adding the option to substitute mix compile with elixirc. Unfortunately, my vimscript-fu is quite weak.
@rramsden, would you be willing to take a stab at this?
This should do what you want:
let g:syntastic_elixir_elixir_exe = 'elixirc'
When i add let g:syntastic_elixir_elixir_exe = 'elixirc'.
Live reload works, But syntax check does not work:
web/controllers/auth.ex|10 error| module Plug.Conn is not loaded and could not be found
@dcy It's up to you to pass the proper options to the checker.
It will break phoenix livereloading if i don't add let g:syntastic_elixir_elixir_exe = 'elixirc'.
The syntax check is not right(work but not right) when add let g:syntastic_elixir_elixir_exe = 'elixirc'.
How to solve this?
@dcy As I said, it's up to you to pass the proper options to the checker. You can _see_ how syntastic runs the checker by enabling debugging (cf. :h syntastic-debug). You can _change_ how syntastic runs the checker by setting g:syntastic_elixir_elixir_args to something useful (cf. :h syntastic-config-makeprg).
Beyond that however, I'm afraid I have no idea what to tell you: I don't know what Phoenix is, and I barely know what Elixir is. I presume you need to pass some include directories to let it know where to find Plug.Conn? If you can't figure it out on your own you should probably ask on some Elixir forum. _shrug_
Most helpful comment
This should do what you want: