phoenixframework / vscode-phoenix

Syntax highlighting support for Phoenix templates in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=phoenixframework.phoenix
MIT License
160 stars 10 forks source link

Support go to component definition from heex templates #21

Open onnimonni opened 9 months ago

onnimonni commented 9 months ago

Currently it's not easy to navigate from components used in heex templates into the elixir file containing the component definition.

Similarly it would really help if we could show the implemented slots directly by hovering over the component or when writing a new component.

More information here: https://elixirforum.com/t/navigating-from-heex-templates-to-core-components-ex-in-vscode/60593

chrismccord commented 9 months ago

We'd gladly accept a PR that adds this! Thanks!

joshchernoff commented 8 months ago

two things come to mind. I assume it will need to know the difference between knowing to point you to the module head vs the function head cause you could be navigating from a functional component or a full fledged liveview. Maybe hashing out what you wish you had here will help other contribute.