elm-language-server icon indicating copy to clipboard operation
elm-language-server copied to clipboard

Provide links to type definitions in parameter hover menu

Open not-my-profile opened this issue 2 years ago • 2 comments

type alias Person =
    { firstname : String }

getFirstname : Person -> String
getFirstname person =
    person.firstname

While hovering over person here does reveal person : Person the hover menu provides no link to the Person definition, which would be handy for functions that are so long that you need to scroll up to reach the type definition.

I'm assuming that because of a limitation with VS Code these types in the hover menu cannot be linked directly, but it would also be helpful if the links were provided below, like for example rust-analyzer does it:

goto_hover

not-my-profile avatar Sep 13 '21 15:09 not-my-profile

Your saying, Alt + Click on the Person in the annotation line is not an option? You could also right click it and choosing Go to definition.

razzeee avatar Sep 18 '21 10:09 razzeee

I didn't give the best example. I am more thinking of e.g. an update function of an Elm app with many cases that are pattern matched. in the middle of the function you only have the variables from the pattern, there is no definition you can quickly jump to.

not-my-profile avatar Sep 18 '21 10:09 not-my-profile