-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: make Hover display std version information #67159
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
On closer inspection, apparently I already added version support to completion. So that leaves just Hover. |
A few rough ideas for how this could be implemented:
|
While we're at it, we should use the same helper in the internal doc viewer (gopls/internal/golang/pkgdoc.go). This can be a separate CL. |
Please assign to me to take a look. :D Thanks. I will comment again for further questions. |
Change https://go.dev/cl/594875 mentions this issue: |
Version is only available for the types of Var, Func, Const & Type. For golang/go#67159 Change-Id: I77f95ccb6027914440ec7a2ea5338318c0f88e60 Reviewed-on: https://go-review.googlesource.com/c/tools/+/594875 Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com>
Change https://go.dev/cl/595135 mentions this issue: |
For golang/go#67159 Change-Id: If3d09a39e8bf0a5ab61dc0953d7250ad75525372 Reviewed-on: https://go-review.googlesource.com/c/tools/+/595135 Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change https://go.dev/cl/595336 mentions this issue: |
For golang/go#67159 Change-Id: I8b8b12949566857f29460675b9dc4d9c6804ff1e Reviewed-on: https://go-review.googlesource.com/c/tools/+/595336 Auto-Submit: Hongxiang Jiang <hxjiang@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change https://go.dev/cl/595855 mentions this issue: |
The available versions are provided for functions and methods. Same as https://pkg.go.dev/ 1. The std lib version is only available for FUNC, METHOD, TYPE. Not available for CONST, VAR & FIELD. Because those types do not have dedicated HTML element, declarations are shown only as source code. 2. Introduce css element stdlibVersion which contains the styles needed. For golang/go#67159 Change-Id: I4b4f469a858a1aca6598f2abed6f990ab1931b00 Reviewed-on: https://go-review.googlesource.com/c/tools/+/595855 Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
While solving #46136 by adding a new analyzers, stdversion, we created an internal helper package https://pkg.go.dev/golang.org/x/tools/internal/stdlib that contains a manifest of all std symbols and their versions.
We should use this information in Completions, to ensure that only version-appropriate completions are offered;
and in Hover, to report the initial Go version for each std symbol. And perhaps other places as well.
The text was updated successfully, but these errors were encountered: