Ale linting with vim

Does anyone have ale linting with live reload working for phoenix projects? If so can you tell me how you fixed the issue?

Which issue?

live reload is broken.

Phoenix live reload or some live reload in vim? I do not use it myself but I want to gather as much info as possible until someone who does finds this thread.

Phoenix live reload is broken when using linters with vim. This is a known issue, I was hoping someone has fixed it.

Just guessing but it might be solvable by running the linters in its own mix env. Because lintung causes recompiling. If though the printer compiles faster then Phoenix, it doesn’t see anything to recompile as all beam files are newer as their source files when phoenix gets aware of the change of the source. I do assume similar problems with other editors and linters, but I do not use any lint integration for mine (except for compiling errors), nor do I currently do phoenix.

You’'ll probably need to change the source of your plugin to test, to make it run mix credo with MIX_ENV=lint, you’ll also need to provide conf/lint.exs, which can be a copy of conf/dev.exs for the test.

1 Like

I don’t think there’s anything ale specific to the problem. I saw it when I had credo running under neomake, so I disabled credo and only use exlixirc specifically outputting to $TMPDIR. I don’t like it, and it gives false positive warnings, but it’s the best I’ve got so far. I’d love to hear a more comprehensive solution too.

Interesting! I’ll have to give that a try when I get some spare time.