Skip to content

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

Open
@glhrmv

Description

@glhrmv

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions