tonini / alchemist.el

Elixir Tooling Integration Into Emacs
http://www.alchemist-elixir.org
906 stars 103 forks source link

Update Phoenix project detection #351

Closed J3RN closed 5 years ago

J3RN commented 5 years ago

Hello! :wave:

I noticed that modern phoenix projects no longer have a web directory, opting instead for a lib/<project_name>_web directory. This is mentioned in passing on the "Up and Running" page for Phoenix. Since alchemist-phoenix-project-p looks for a project-root "web" directory, it was failing to detect my phoenix projects.

I figured it would be difficult to ascertain the name of the project in order to check for a lib/<project_name>_web directory explicitly, I opted instead to check whether the string ":phoenix" occurs in the mix.exs file of the project. This would be expected in the dependencies section of that file.

We could, alternately, check for the existence of a lib/*_web directory. I'm totally open to feedback on this! :smile:

J3RN commented 5 years ago

On second look, I appear to have duplicated #321. I'll try to base my work off of @gebrek's, as his is a more complete solution.

J3RN commented 5 years ago

Closing in favor of #352