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

Hover/go to definition do not work with top-level splices #733

Closed
mpickering opened this issue Oct 5, 2020 · 4 comments
Closed

Hover/go to definition do not work with top-level splices #733

mpickering opened this issue Oct 5, 2020 · 4 comments
Labels

Comments

@mpickering
Copy link
Contributor

If you have a top-level splice then when you hover over it you get information about the generated code rather than the source program. I made a start at fixing this on a branch but got stuck working out how to mix together the splice expressions and the normal HieASTs information.

The plan for fixing this was:

  • Add a hook to capture the spliced expression before it is run (implemented)
  • Use this information in the GetHieFile rule in order to add information about the splice expression so it works with hover. (Where I am stuck)

https://github.com/mpickering/ghcide/tree/wip/top-level-splices-hover

@mpickering
Copy link
Contributor Author

I don't think enough stuff from HieAst is exported to implement this. Only enrichHie and mkHieFile are exported.

@mpickering
Copy link
Contributor Author

Working patch is on this branch: https://github.com/mpickering/ghcide/tree/wip/top-level-splices-hover

I only tested it with GHC 8.8.

@wz1000
Copy link
Collaborator

wz1000 commented Oct 19, 2020

Are you going to make a PR for this?

@pepeiborra pepeiborra transferred this issue from haskell/ghcide Dec 30, 2020
@jneira
Copy link
Member

jneira commented Oct 4, 2021

This should had been fixed by #759 which included https://github.com/mpickering/ghcide/tree/wip/top-level-splices-hover
Thanks!

@jneira jneira closed this as completed Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants