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

Feature: Convert :GoCallers to use gopls when enabled #2711

Closed
rmzg opened this issue Feb 10, 2020 · 7 comments · Fixed by #3088
Closed

Feature: Convert :GoCallers to use gopls when enabled #2711

rmzg opened this issue Feb 10, 2020 · 7 comments · Fixed by #3088

Comments

@rmzg
Copy link

rmzg commented Feb 10, 2020

When gopls is enabled and working it would be nice to use it for callers and friends instead of the very old go guru program.

@bhcleek
Copy link
Collaborator

bhcleek commented Feb 11, 2020

It would be nice, and I've been trying to figure out a way to do it, but haven't figured out a good way yet. In the meantime, you can use :GoReferrers to get close to the same behavior.

@hungrybirder
Copy link

hungrybirder commented Jul 27, 2020

It would be nice, and I've been trying to figure out a way to do it, but haven't figured out a good way yet. In the meantime, you can use :GoReferrers to get close to the same behavior.

yes.

:GoReferrers can show the refs in Quickfix List. If I choose one ref, the quickfix list context is empty and not closed automatically.

coc.nvim <Plug>(coc-references) impls this feature is better,
Will vim-go implement the same feature?

Thank you.

@bhcleek
Copy link
Collaborator

bhcleek commented Jul 27, 2020

If I choose one ref, the quickfix list context is empty and not closed automatically.

Are you saying that the quickfix list has all of its entries removed after you jump to one of the refs? That's odd and doesn't match any behavior that I know about.

coc.nvim (coc-references) impls this feature is better,
Will vim-go implement the same feature?

:GoReferrers has two modes: gopls and guru. The only difference is where it gets the data from. There aren't currently any plans to refactor. If you'd like to suggest a behavior change, feel free to open a new issue to describe and discuss it.

@stamblerre
Copy link
Contributor

guru's callers and callees functionality is closer to LSP's callHierarchy feature, which gopls doesn't yet support: golang/go#39461.

@bhcleek
Copy link
Collaborator

bhcleek commented Jul 27, 2020

Thanks, @stamblerre. I subscribed to golang/go#39461 so I can modify vim-go when the gopls feature lands.

@stamblerre
Copy link
Contributor

As a follow-up, call hierarchy has now been implemented and released in the latest few versions of gopls.

@bhcleek
Copy link
Collaborator

bhcleek commented Nov 11, 2020

Thanks, Rebecca. Despite having subscribed to golang/go#39461, I missed when it was closed.

bhcleek added a commit to bhcleek/vim-go that referenced this issue Nov 13, 2020
bhcleek added a commit to bhcleek/vim-go that referenced this issue Nov 13, 2020
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

Successfully merging a pull request may close this issue.

4 participants