-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elixir umbrellas - any ideas if its possible to get it working? #154
Comments
Not an ideal solution, but I worked around it by detecting if I'm in an umbrella root on startup and calculating the projections for each app. In my case: function! AddUmbrellaProjections()
let l:apps = split(globpath('apps', '*'), '\n')
if filereadable("mix.exs") && isdirectory("apps")
let l:projections = {}
for l:app in l:apps
let l:projections[l:app . '/lib/*.ex'] = {
\ "skeleton": "mod",
\ "alternate": l:app . "/test/{}_test.exs"
\ }
endfor
call projectionist#append(getcwd(), l:projections)
endif
endfunction
autocmd User ProjectionistDetect
\ call AddUmbrellaProjections() |
The right way to do this is to start with |
"apps//lib//controllers/*_controller.ex": { |
I had a setup like that and it was perfect,
but stopped working in umbrella app which adds another two nested directories
apps/app_name/lib/**/controllers/
difference is
and default umbrella is nested 2 levels deeper
2 options come to my mind - have a way to split the dirname and drop the first two elements from the list or have a possibility to run a regex on the dirname
The text was updated successfully, but these errors were encountered: