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

Add a handler for "Go To Declaration"

Open michaelpj opened this issue 3 years ago • 1 comments

At the moment we mostly just use "go to definition", but LSP also has "go to declaration". I think the concept of a declaration does actually make sense in Haskell, namely:

  1. For entities that have a type/kind signature, go to declaration could go to the signature (which can be in a different location)
  2. For typeclass methods, go to declaration could go to the declaration in the class, and go to definition could go to the definitions in the instances
  3. Anything else?

michaelpj avatar Aug 10 '22 11:08 michaelpj

"go to declaration" could navigate to relevant import statement for a non-local symbol; rarely used, but could be useful

typeclass-wise, there's also "go to implementation" request, which sounds semantically correct

develop7 avatar Oct 13 '24 12:10 develop7