Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
glhrmv opened this issue Jun 2, 2024 · 1 comment

Comments

@glhrmv
Copy link

glhrmv commented Jun 2, 2024

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.

@lukaszsamson
Copy link
Collaborator

Please send a PR. I'm not actively working on Phoenix specific problems. You can find the code in

@lukaszsamson lukaszsamson changed the title "Go to definition" not working for identifier inside tuple with explicit parent module name [Feature request][Phoenix] "Go to definition" not working for identifier inside tuple with explicit parent module name Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants