Skip to content

Feature request: Goto definition for .heex templates #1155

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

Open
rudiejd opened this issue Jan 17, 2025 · 4 comments
Open

Feature request: Goto definition for .heex templates #1155

rudiejd opened this issue Jan 17, 2025 · 4 comments

Comments

@rudiejd
Copy link

rudiejd commented Jan 17, 2025

When writing .heex templates, I often want to jump between the template and function and/or module component definitions in my mix project. However, I am currently unable to jump to the definition of a component in elixirls.

For example, if you want to test this out, you can make a new Phoenix project and try to go-to definition on the <.simple_form> component. I would expect this to take me to the simple_form/1 definition in the core_components.ex file, but instead there is no navigation.

Version: v0.26.2
Editor: Neovim v0.11.0-dev-1272+g3d3a99e69c
OS: MacOS Mojave
Elixir/Erlang: Elixir 1.18.1 (compiled with Erlang/OTP 27)

@lukaszsamson
Copy link
Collaborator

Generally, I try to keep ElixirLS framework agnostic. I make exceptions if the functionality covers a major framework. There is already some phoenix router stuff in definition provider. Can you create a PR?

@velrest
Copy link

velrest commented Mar 10, 2025

@rudiejd @lukaszsamson Do you know if any work has been done on this? Otherwise I would like to take a look at this change.

@lukaszsamson
Copy link
Collaborator

I haven’t looked into this

@rudiejd
Copy link
Author

rudiejd commented Mar 10, 2025

@velrest I looked into it, but couldn't figure out how to get the change done. Feel free to take it

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

3 participants