elixir-ls icon indicating copy to clipboard operation
elixir-ls copied to clipboard

Feature request: Goto definition for .heex templates

Open rudiejd opened this issue 11 months ago • 4 comments

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)

rudiejd avatar Jan 17 '25 14:01 rudiejd

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?

lukaszsamson avatar Jan 17 '25 14:01 lukaszsamson

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

velrest avatar Mar 10 '25 09:03 velrest

I haven’t looked into this

lukaszsamson avatar Mar 10 '25 11:03 lukaszsamson

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

rudiejd avatar Mar 10 '25 12:03 rudiejd