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
x/tools/gopls: return godoc.org reference in documentation #34240
Comments
I've picked this up https://go-review.googlesource.com/c/tools/+/200604 |
Change https://golang.org/cl/200604 mentions this issue: |
This adds a link to documentation to the hover contents for the current symbol if it is exported. Updates golang/go#34240 Change-Id: I19c66e91e46f79284bfd0006c53f518eda4edef7 Reviewed-on: https://go-review.googlesource.com/c/tools/+/200604 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
The above CL partially fixes this, as it doesn't handle methods or fields. A follow-up is needed to handle this. |
Change https://golang.org/cl/210201 mentions this issue: |
This change refactors some of the logic that builds a link anchor for a given symbol, pushing the actual Link into the HoverInformation struct. This is necessary because type information is needed to build up that link in certain cases, like methods. The last step will be to correctly display struct fields. Updates golang/go#34240 Fixes golang/go#36031 Change-Id: I7f989faddbaa07f91838a870b4477bf78ce8ddf7 Reviewed-on: https://go-review.googlesource.com/c/tools/+/210201 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
This is complete as of the above CL. |
I propose to add a feature (probably configuarable) when documentation request will result with a related
godoc.org
reference at the bottom, in same way as it's done in other editors/places.For example, here is how standard VS Code HTML language feature returns reference to MDN for a
class
property documentation:And here is how it's done for Go in Goland:
Latter have a link to
https://godoc.org/github.com/jinzhu/gorm#DB.Model
I found it very useful.
The text was updated successfully, but these errors were encountered: