-
-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
textDocument/hover does not work inside Phoenix when checking a package in the deps/ folder.
For example, trying to hover on render/3 shows this.
13:05:17.945 [info] Resolved entity: {:call, MyProjectWeb.PageController, :render, 2}
13:05:17.949 [warning] Could not resolve hover request, got: :error
13:05:17.949 [debug] handled request client -> server textDocument/hover in 6ms
However, Go to definition works, and inside of the dependency, the correct tooltip is shown
Go to definition shows this logs, but even with some errors, I correctly navigate to the definiton inside deps/phoenix/.
13:07:37.855 [info] Resolved entity: {:call, MyProjectWeb.PageController, :render, 2}
13:07:37.859 [warning] Could not resolve hover request, got: :error
13:07:37.859 [debug] handled request client -> server textDocument/hover in 6ms
13:07:38.234 [info] Resolved entity: {:call, MyProjectWeb.PageController, :render, 2}
13:07:38.235 [debug] handled request client -> server textDocument/codeAction in 6ms
13:07:39.497 [info] Resolved entity: {:call, MyProjectWeb.PageController, :render, 2}
13:07:39.498 [info] No definition found for {:call, MyProjectWeb.PageController, :render, 2} with Indexer.
13:07:39.502 [warning] ** (ArgumentError) could not call Module.put_attribute/3 because the module MyProjectWeb.PageController is already compiled
(elixir 1.19.1) lib/module.ex:2453: Module.assert_not_compiled!/3
(elixir 1.19.1) lib/module.ex:2132: Module.__put_attribute__/5
(gettext 0.26.2) expanding macro: Gettext.__using__/1
nofile:2: MyProjectWeb.PageController (module)
13:07:39.506 [warning] ** (ArgumentError) could not call Module.put_attribute/3 because the module MyProjectWeb.PageController is already compiled
(elixir 1.19.1) lib/module.ex:2453: Module.assert_not_compiled!/3
(elixir 1.19.1) lib/module.ex:2132: Module.__put_attribute__/5
(gettext 0.26.2) expanding macro: Gettext.__using__/1
nofile:2: MyProjectWeb.PageController (module)
13:07:39.654 [debug] handled request client -> server textDocument/definition in 159ms
13:07:39.697 [info] ################### opened file:///my_project/deps/phoenix/lib/phoenix/controller.ex
13:07:39.698 [debug] handled notification client -> server textDocument/didOpen in 9ms
13:07:40.035 [debug] handled request client -> server textDocument/codeLens in 90ms
13:07:40.101 [info] Resolved entity: {:call, Phoenix.Controller, :render, 2}
13:07:40.103 [debug] handled request client -> server textDocument/codeAction in 188ms
And correctly displays the tooltip
13:08:13.288 [info] Resolved entity: {:call, Phoenix.Controller, :render, 2}
13:08:13.319 [debug] handled request client -> server textDocument/hover in 89ms
Specs:
Linux 6.17.3-arch2-1 #1 x86_64 GNU/Linux
elixir 1.19.1-otp-28 (through mise)
erlang 28.1.1 (through mise)
Happens both in Zed and Neovim
Metadata
Metadata
Assignees
Labels
No labels