sublimecoder
Vim interfering with Phoenix recompile after saving
So I’m having some trouble. Recently my phoenix code stopped reloading, when I would make a change to backend code. So I’ve been having to flip back a forth killing the server and reloading after every change. I’m currently using Vim and Ale for linting, I read a github issue that said this was an issue a couple years ago, not sure if its still an issue but It does go away if I switch to emacs or atom or another editor so it makes me think its most likely the same issue.
I’d like to keep using vim since most of my muscle memory is there, anyone have any work arounds or solutions for this? Any help would be appreciated.
Thanks
First Post!
NobbZ
Deactivate compile on save or any plugin that does it to lint. Or if you are able to, change them to use different folders than the project folder to temporary save, compile and lint.
You could tell vim to use an :editor MIX_ENV which is equal to :dev but does end up in ./_build/editor/ instead.
Those are the workarounds that I’m aware of. You can use those workarounds for any editor-plugin that compiles on save.
Most Liked
gregvaughn
NobbZ
My assumption is, that he starts his editor with MIX_ENV=test, similar to how I proposed MIX_ENV=edit in this thread.
How to actually do this depends on your operating system, your shell and the editor.
sublimecoder
Thanks, not sure how to do that for Ale. I did confirm it is Ale doing it. I just removed it and the issue cleared itself up. Once I find the settings or another solution I’ll post it here.
Thanks for pointing me in the right direction.
Last Post!
jvoegele
I do the same, @gregvaughn. The only problem I’ve found with doing this is that it effectively breaks mix test --stale, so just be aware of that.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









