elixir-lsp / elixir-lsp/elixir-ls

[Feature request][Phoenix] "Go to definition" not working for identifier inside tuple with explicit parent module name

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

Description

### Environment

* Elixir & Erlang versions (elixir --version): 1.16.2 (compiled with Erlang/OTP 26)
* Elixir Language Server version: 0.21.3
* Operating system: macOS
* Editor or IDE name (e.g. Emacs/VSCode): VSCode
* Editor Plugin/LSP Client name and version: ElixirLS (v0.21.3)

### Current behavior

Hi all, I searched through for similar issues and couldn't find one so apologies if I missed it.

When running the `phx.gen.auth` Phoenix generator, in the `router.ex` file I noticed that I wasn't able to jump to definition for the `PentoWeb.UserAuth` module in the code seen below:

Screenshot 2024-06-02 at 01 32 14

However, when I omitted the module name and changed it to just `UserAuth`, ElixirLS was able to provide a hyperlink that points me correctly to the module definition.

This seems to be confined to identifiers in tuples because in other parts of the code (see below), it works just fine.

Screenshot 2024-06-02 at 09 57 41

### Expected behavior

ElixirLS should know how to jump to definition if the module name is explicitly provided on an identifier inside a tuple.

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.