tonini / alchemist.el

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

Alchemist Doesn't Show Help For Phoenix render function #305

Open caleb opened 7 years ago

caleb commented 7 years ago

Hi,

Firstly, I would like to thank everyone who works on this project. I'm getting started with Elixir and it's nice to have such good tools (Spacemacs + Alchemist is a really awesome combination!)

I have a Phoenix project that I'm playing around with, and when I try to get help for the render call in a controller nothing happens and I get an error in the *alchemist-server* buffer:

Process /home/caleb/Projects/waffle-cup/web/ exited abnormally with code 1

I can get help for built-in Elixir functions and modules, and from functions that are called directly from dependent modules, but maybe the import/use combination that phoenix uses confuses Alchemist?

The render function is imported into my PageController via the use WaffleCup.Web, :controller call, and that use in turn uses the Phoenix.Controller module, which imports itself which includes the render function.

Here is a video showing the situation: https://vimeo.com/222012511

defmodule WaffleCup.PageController do
  use WaffleCup.Web, :controller

  def index(conn, _params) do
    Enum.each(1..100, fn(n) ->
      Que.add(WaffleCup.FileAppendWorker, {"/srv/www/bwah.log", "OH HAI MARK! #{n} \n"})
    end)

    # This is what I can't get help for 
    render conn, "index.html"
  end
end

EDIT I just read that the Atom plugin is a derivative project from the Alchemist server, so this next comment doesn't really apply. END EDIT

I tried the Atom elixir plugin which I believe uses the Alchemist Server and it does show the help for the render function, so I figured it might be a bug in the Emacs mode.

If there is anything I can do to get more information let me know.

Thanks again!

Caleb

egidijusz commented 6 years ago

Hello,

I can confirm this. Emacs (spacemacs) does not show help for render function. It does work for builtin Elixir functions and other libraries.

x-ji commented 5 years ago

Might be related to issue https://github.com/tonini/alchemist.el/issues/179? I really want to use Spacemacs instead of VSCode for writing Elixir since it's much more convenient in many other aspects. But in general the Elixir Language Server plugin in VSCode seems to work quite better than Alchemist in aspects such as this, which is a shame.

x-ji commented 5 years ago

Also see https://github.com/tonini/alchemist.el/pull/341, https://elixirforum.com/t/emacs-lsp-mode-language-server-elixir-ls-anyone/11834/14 and https://elixirforum.com/t/emacs-spacemacs-with-language-server-protocol-for-elixir-or-any-solution-for-emacs-guys/17529

x-ji commented 5 years ago

https://github.com/tonini/alchemist.el/pull/350 is a PR that tries to use elixir-ls for go to definitions.