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

Add an option to choose between guru and gopls for :GoReferrers #2566

Merged
merged 3 commits into from
Nov 8, 2019

Commits on Nov 8, 2019

  1. add g:go_referrers_mode

    Add a new option, g:go_referrers_mode, so that users can choose to use
    either guru or gopls for :GoReferrers, because gopls currently has a bug
    that causes its textDocument/references implementation to only return
    references from within the package of the identifier.
    
    gopls is still the default, because guru doesn't work outside of GOPATH.
    bhcleek committed Nov 8, 2019
    Configuration menu
    Copy the full SHA
    cae1a26 View commit details
    Browse the repository at this point in the history
  2. resolve :GoReferrers errors

    Fix errors that occurred when running :GoReferrers more than once when
    one of the references is in a file that is not loaded. On the first run,
    readline() would be used to get the contents, but then on the second run
    there is a buffer for the file that was previously not assigned a buffer
    number, but it's an unloaded buffer, so getbufline() returned an empty
    list.
    bhcleek committed Nov 8, 2019
    Configuration menu
    Copy the full SHA
    ebffc2c View commit details
    Browse the repository at this point in the history
  3. sort references

    Sort references so that the list will be in order based on filename,
    line number, and start position. Prior to this, multiple invocations of
    :GoReferrers would reorder the references and any given invocation may
    find that references from the same file may not be in the document
    order.
    bhcleek committed Nov 8, 2019
    Configuration menu
    Copy the full SHA
    ac1b780 View commit details
    Browse the repository at this point in the history