-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: support pkg.go.dev in textDocument/documentLink #35563
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
Comments
Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here. |
/cc @julieqiu |
Thanks for the suggestion! We can quite absolutely change the links to point to pkg.go.dev, but you're right that adding the versions will be a little tougher. It will be more doable once #31999 is resolved. |
@stamblerre I would like to claim this one. Is this ready to be done, or do we wait for #31999 ? |
@jbszczepaniak: I think we can do the first step of changing the link godoc.org links to point to pkg.go.dev. |
If the version info isn't going to be used, I'd maybe consider making this configurable. The default behavior of pkg.go.dev compared to godoc.org ( |
So what is decision here @stamblerre? Do we want to get version as well and point to the right pkg.go.dev website? If this is only about changing link, here is the CL https://go-review.googlesource.com/c/tools/+/209337 |
Change https://golang.org/cl/209337 mentions this issue: |
Updates golang/go#35563 Change-Id: I88ae3f742daf5043d4784fe8827454fb1ce1f9db Reviewed-on: https://go-review.googlesource.com/c/tools/+/209337 Reviewed-by: Rebecca Stambler <rstambler@golang.org> Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Closing this since we are now linking to https://pkg.go.dev. Using version info can be tracked in #31999. |
gopls
currently uses godoc.org in itsdocumentLink
responses. This is fine, but it'd be nice to support the newpkg.go.dev
site as it lets you look at a specific module version's documentation.gopls
has the module version info for imports, so could construct links to the new site with the correct version, which would work a bit better than just pointing to godoc.org in some cases. (Looking at the implementation ofdocumentLink
, it would require some extra work, since right now it just uses the AST and grabs the link, versus actually needing the import info.)Sorry to drop the issue template, but it's a feature request and I thought it'd be a bunch of stuff that didn't matter.
The text was updated successfully, but these errors were encountered: