phoenix.vim
phoenix.vim copied to clipboard
First cut at Phoenix 1.3 projections. Fixes #10
I noticed the projections were off for Phoenix 1.3 and found #10. I've written a .projections.json
file for my own project and wanted to share it back (see .projections.json).
This PR is a first cut at adapting my projections into phoenix.vim. Do you mind taking a look and letting me know what else is necessary to help ship a 1.3 update for the librrary?
Looks great, thanks so much for the PR. I really appreciate the help.
I've been away from Phoenix for a while so need to look up the exact changes. Off the top of my head I think there are one or two other things that will need to be changed in this PR:
-
I'm pretty sure that template_for will need to be updated to reflect the new module structure. This function generates the initial content for files that get created with projectionist.
- The module naming might be out of date (it generates stuff like
MyApp.FooController
). - Similarly the imports (e.g.
use MyApp.Web.Controller
) are probably out of date too.
- The module naming might be out of date (it generates stuff like
-
The logic to find matching files using
gf
may need to be updated. I'm not sure about this one, it might still work fine so it's worth testing out. It should be a very small change. You can see here that everything inweb/
is added topath
, we probably just need to change this to wherever the new location is (lib
)?
If I think of anything else I'll add it here.
Thanks again for your contribution :heart:. If you want to tackle the points above feel free, it might be a while before I can get around to them
Thanks for the pointers! I’m actually just learning Phoenix mysef so this was a great way to more deeply understand project structure. I’ll definitely give this a try as time permits.
The gist has moved here: .projections.json