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 references #211

Closed
sir4ur0n opened this issue Jul 20, 2020 · 6 comments
Closed

Go to references #211

sir4ur0n opened this issue Jul 20, 2020 · 6 comments
Labels
component: ghcide status: blocked Not actionable, because blocked by upstream/GHC etc. type: enhancement New feature or request

Comments

@sir4ur0n
Copy link
Collaborator

Hi,

It looks like HLS currently doesn't support "Go to References" family of features, am I correct?

Basically this allows one to find places where a particular piece of code (function/type) is used.

What do you think about adding this feature?

Cheers

@fendor
Copy link
Collaborator

fendor commented Jul 20, 2020

Hi!

Indeed, hls does not support this feature yet.
There is a WIP branch of ghcide to support it: https://github.com/wz1000/ghcide/tree/hiedb-2
It uses HIE files and a sqlite database.
I use this branch as a daily driver but it still has some bugs.

Maybe @wz1000 can tell us how we can help to get this feature :)

@jneira
Copy link
Member

jneira commented Nov 9, 2020

There is a open pr to add hie-db to ghcide, it should add this feature.

@jneira jneira added the status: blocked Not actionable, because blocked by upstream/GHC etc. label Nov 9, 2020
@jneira
Copy link
Member

jneira commented Dec 29, 2020

In ghcide @meditans mentioned the find-references feature. As it seems to be related with this we are gonna include here.
In vscode the unique command i can find is References: Find All Implementantions. Not sure if @meditans was referring to though.

@meditans
Copy link

@jneira in emacs there's the command lsp-find-definition that works as intended, and the command lsp-find-references that should bring you to where a variable is used and instead gives back the error:

helm-M-x-execute-command: The connected server(s) does not support method textDocument/references.
To find out what capabilities support your server use ‘M-x lsp-describe-session’

How were @fendor and @wz1000 using it?

More broadly, I'm not sure what the status of this feature is, as the linked issue haskell/ghcide#898 has been recently closed with the migration to hls. Who is working on this? What needs to be done?

@jneira
Copy link
Member

jneira commented Jan 23, 2021

that ghcide pr has been moved to this repo as #704

@jneira
Copy link
Member

jneira commented Feb 24, 2021

And the pr has been merged so go to references should work now
@sir4ur0n @meditans

@jneira jneira closed this as completed Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ghcide status: blocked Not actionable, because blocked by upstream/GHC etc. type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants