elixir-lsp / elixir-lsp/elixir-ls

Unable to autocomplete/hover macro in Phoenix Project

Open
#1,124 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Elixir
Stars
1.8k
Forks
227
Avg merge
31m
Merged PRs (30d)
2

Description

The project is running in VSCode devcontainer

### Sample Code
```
defmodule AppWeb.PageController do
use AppWeb, :controller

def home(conn, _params) do
# The home page is often custom made,
# so skip the default app layout.
render(conn, :home, layout: false)
end
end
```

```
defmodule AppWeb do
@spec controller() :: {:__block__, [], [{:import, [...], [...]} | {:use, [...], [...]}, ...]}
def controller do
quote do
use Phoenix.Controller,
formats: [:html, :json],
layouts: [html: AppWeb.Layouts]

import Plug.Conn
import AppWeb.Gettext

unquote(verified_routes())
end
end
```

* Elixir & Erlang versions (elixir --version):
elixir 1.17.3/OTP 27
* Elixir Language Server version:
ElixirLS v0.24.1
* Operating system:
MacOS
* Editor or IDE name (e.g. Emacs/VSCode):
VSCode

### Elixir-LS Log
```
[Warn - 11:40:30 AM] Unable to expand macro AppWeb.__using__/1: ** (FunctionClauseError) no function clause matching in AppWeb.__using__/1
(app 0.1.0) expanding macro: AppWeb.__using__/1
nofile:2: AppWeb.PageController (module)
```

### Reproduction steps
1. install elixir-ls in VSCode
2. Create fresh project using `mix phx.new app`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.