Is this because it is downloaded in some binary form?
Currently goto definition only works for the local package. Where should it take you for the base library? Typically people don't even have a copy of the source installed. The Haddock documentation is one option, but it's no longer really goto definition...
fwiw we do have some logic for cross-package goto definition based on HIE files that works for DAML. It allows you to configure the location of the sources so it would be possible to point it to something like ~/.cabal/packages/hackage.haskell.org. But it definitely requires more work and the location of the sources should probably come from hie-bios as there is no way we can figure out where they are located (if they are present at all).
The Haddock documentation is one option, but it's no longer really goto definition...
Could we add support for goto documentation?
Currently goto definition only works for the local package. Where should it take you for the base library? Typically people don't even have a copy of the source installed. The Haddock documentation is one option, but it's no longer really goto definition...
This doesn't help in the short term, but it's good to remember these aren't immutable restrictions.
haskell-code-explorer allows cross-package jumping (so long as you've indexed each dependency) and it is insanely nice. Seriously, go to a random function and try it out. I really, really want this in my editor as well.
That said, I know that ghcide is new, and at the moment I'm just delighted that it works so well. But I'd like to keep the sights for Haskell editor tooling set high in the long run. I'd be 100% OK with downloading the source for each of my dependencies (and waiting X hours for them all to be indexed) if it meant jump-to-definition would always work in my editor.
PS In the meantime jumping to the Haddocks would be totally fine with me.
I recommend using codex meanwhile. It can generate ctags for all the dependencies
@arthurborisow: Great point as a short term solution.
In the long run I'm really hoping for something better than codex though. Lots of terms (especially ones with common names like Success) appear in many different packages, and it's jarring to be taken to the wrong one so often.
Note that we have the fully qualified name, as base-version.Prelude.Just or whatever, it's just where to send you that we need to figure out.
This feature is included in @wz1000 hiedb branch of ghcide and merge it would bring it to master
@wz1000 commented in a duplicate issue in how to use its hiedb branch, that includes this feature: https://github.com/haskell/ghcide/issues/745#issuecomment-683334743
Most helpful comment
This doesn't help in the short term, but it's good to remember these aren't immutable restrictions.
haskell-code-explorer allows cross-package jumping (so long as you've indexed each dependency) and it is insanely nice. Seriously, go to a random function and try it out. I really, really want this in my editor as well.
That said, I know that
ghcideis new, and at the moment I'm just delighted that it works so well. But I'd like to keep the sights for Haskell editor tooling set high in the long run. I'd be 100% OK with downloading the source for each of my dependencies (and waiting X hours for them all to be indexed) if it meant jump-to-definition would always work in my editor.PS In the meantime jumping to the Haddocks would be totally fine with me.