-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: support LSP language features for go.mod files #36501
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
Following up on some discussions today:
|
Change https://golang.org/cl/218557 mentions this issue: |
Change https://golang.org/cl/219079 mentions this issue: |
This change adds a code lens for go.mod files that will let a user know if a module can be upgraded, once it is clicked gopls will run a command to update that module. Updates golang/go#36501 Change-Id: Id22b8097ede4972cf73bc029ec927544a71b7150 Reviewed-on: https://go-review.googlesource.com/c/tools/+/218557 Run-TryBot: Rohan Challa <rohan@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Change https://golang.org/cl/219938 mentions this issue: |
This change appends to the pkg.go.dev link the version of the module that is being used. To get this functionality, go/packages.Package now contains a module field which gets populated from the "go list" call. This module field is then used to get the version of the module that we are linking to. Updates golang/go#36501 Change-Id: I9668a6da0fd3ec8f4cde017986419c8d28196765 Reviewed-on: https://go-review.googlesource.com/c/tools/+/219079 Run-TryBot: Rohan Challa <rohan@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Change https://golang.org/cl/220359 mentions this issue: |
This change implements support for textDocument/documentLink when it comes to go.mod files. Updates golang/go#36501 Change-Id: Ic0974e3e858dd1c8df54b7d7abee085bbcb6d4ee Reviewed-on: https://go-review.googlesource.com/c/tools/+/219938 Run-TryBot: Rohan Challa <rohan@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This change implements support for textDocument/hover when it comes to go.mod files. Updates golang/go#36501 Change-Id: Ie7da0194bb972955b7ab9cf7b9c9972bd9f4b8a9 Reviewed-on: https://go-review.googlesource.com/c/tools/+/220359 Run-TryBot: Rohan Challa <rohan@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Change https://golang.org/cl/221108 mentions this issue: |
Change https://golang.org/cl/221223 mentions this issue: |
This change adds an upgrade all dependencies codelens on the go.mod file if there are available upgrades. Updates golang/go#36501 Change-Id: I86c1ae7e7a6dc01b7f5cd7eb18e5a11d96a3acc1 Reviewed-on: https://go-review.googlesource.com/c/tools/+/221108 Run-TryBot: Rohan Challa <rohan@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This change implements support for textDocument/formatting when it comes to go.mod files. It also adds formatting on save ability. To enable formatting on save for go.mod files, you need to include the following settings inside of your VSCode settings.json: ... "[go.mod]": { "editor.codeActionsOnSave": { "source.organizeImports": true, }, "editor.formatOnSave": true, }, ... Updates golang/go#36501 Change-Id: I60ac14d0e99b2b086fe9a8581770771aafc2173c Reviewed-on: https://go-review.googlesource.com/c/tools/+/221223 Run-TryBot: Rohan Challa <rohan@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
@ridersofrohan: Can we close this, or are there any more features remaining? The only thing that comes to mind is folding range. |
I think we can close it. I don't know how useful folding range would be considering there are only 4 directives for go.mod files. |
This is a subset of #31999, but I felt it was useful to break it out. Some features worth considering (please add more here as they come up):
textDocument/documentLink
: Clicking on a dependency could take you to the discovery site./cc @ridersofrohan
The text was updated successfully, but these errors were encountered: