Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Go to definition" on external library code #850

Closed
ysangkok opened this issue Aug 29, 2020 · 2 comments
Closed

"Go to definition" on external library code #850

ysangkok opened this issue Aug 29, 2020 · 2 comments

Comments

@ysangkok
Copy link
Member

Apologies if the issue already exists, I am just submitting it from Reddit so that it doesn't get lost: qualiaqq's post

@wz1000
Copy link
Collaborator

wz1000 commented Aug 29, 2020

I have implemented this (along with references and other stuff) using https://github.com/wz1000/HieDb in this branch https://github.com/wz1000/ghcide/tree/hiedb-3

Instructions for use:

  1. Generate .hie files for your dependencies by putting something like the following in your cabal.project file (an equivalent method for stack should exist) and rebuilding.
package *
  ghc-options: -fwrite-ide-info -hiedir /absolute/path/to/some/directory
  1. Index the hie files by navigating to the root of your project directory (usually the directory with the hie.yaml file) and executing
$ ghcide hiedb index path/to/directory/with/hie/files
  1. Enjoy go to definition for dependencies!

The branch is pretty stable at this point, but there still might be some rough spots. If you encounter any, please open an issue on my fork.

(This doesn't work for ghc boot libs since hie files for those a bit hard to come by unless you compile ghc yourself. I'm working to change this for ghc 9.0)

@jneira
Copy link
Member

jneira commented Nov 23, 2020

Closed as duplicate of #708 as it has more content (but i will link the awesome @wz1000 comment on how to use its incoming branch)

@jneira jneira closed this as completed Nov 23, 2020
@pepeiborra pepeiborra transferred this issue from haskell/ghcide Jan 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants