-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: support all features on the command line #32875
Comments
If no one's working on it, I'll take a swing at adding rename. Looks like it's a matter of adding an |
This has been merged, see golang/tools#157. Great support for a first time contributor. |
If no one's on it, I'd give |
@rentziass: Absolutely, please do! Feel free to reach out with any questions here or on the Gophers Slack (https://invite.slack.golangbridge.org/). |
@stamblerre any others need implementation? |
Anything that doesn't have a test in this file is available: https://github.com/golang/tools/blob/e4d7c6f25b8e08c4784d6585835a053ae0ad53bb/internal/lsp/cmd/test/cmdtest.go#L41. I would suggest Import or SuggestedFix as a useful next feature. |
Great, thanks I'll |
Change https://golang.org/cl/202178 mentions this issue: |
Change https://golang.org/cl/202480 mentions this issue: |
I'll also take a look at |
This adds support for calling import from the gopls command line, e.g. $ gopls imports -w ~/tmp/foo/main.go Optional arguments are: -w, which writes the changes back to the original file; and -d, which prints a unified diff to stdout With no arguments, the changed files are printed to stdout. Updates golang/go#32875
Change https://golang.org/cl/202624 mentions this issue: |
I'll keep going with |
e.g. $ gopls links ~/tmp/foo/main.go Optional arguments are: -json, which emits range and uri in JSON With no arguments, a unique list of links are emitted. Updates golang/go#32875
Change https://golang.org/cl/203297 mentions this issue: |
This change adds command line support for references. Example: $ gopls references ~/tmp/foo/main.go:8:6 $ gopls references ~/tmp/foo/main.go:#53 Updates golang/go#32875 Change-Id: I9a0cf6ae8ba0a5c3d4ffc829b96fe3b42297c192 Reviewed-on: https://go-review.googlesource.com/c/tools/+/202178 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Change https://golang.org/cl/203609 mentions this issue: |
Change https://golang.org/cl/204057 mentions this issue: |
O, I see, right. It seems that these are yet to be done:
I will take from the list - |
@jbszczepaniak I'm currently working on |
🤦♂ ok. I believe this is a list (right?):
Thus I will take |
@rentziass: Do you intend to add all of the completion related test code in your CL? In that case, I believe that this issue could be considered done. |
I'd surely like to try :) |
O, In that case I will move to something else.
… On 22 Nov 2019, at 17:33, Francesco Renzi ***@***.***> wrote:
I'd surely like to try :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#32875?email_source=notifications&email_token=ADREANDBLCOVT5MRW6ICHRTQVACVTA5CNFSM4H4U2ROKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE6FFUI#issuecomment-557601489>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADREANAYSF55LGFBQH2EESDQVACVTANCNFSM4H4U2ROA>.
|
This change adds command line support for implementation. Example: $ gopls implementation ~/tmp/foo/main.go:8:6 $ gopls implementation ~/tmp/foo/main.go:#53 Updates golang/go#32875 Change-Id: I3aa89a788ded886368b07c1824325069f3cba88a Reviewed-on: https://go-review.googlesource.com/c/tools/+/208357 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This change adds command line support for highlight. Provided with an identifier position, it will display the list of highlights for that within the same file. Example: $ gopls highlight ~/tmp/foo/main.go:3:9 $ $ 3:9-6:0 $ 10:22-11:32 $ 12:10-12:9 $ 12:20-30:0 Updates golang/go#32875 Change-Id: I5de73d9fbd9bcc59a3f62e7e9a1331bc3866bc75 Reviewed-on: https://go-review.googlesource.com/c/tools/+/207291 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This change adds command line support for prepare_rename. Updates golang/go#32875 Change-Id: I7f155b9c8329c0faa26a320abab162730a7916ad GitHub-Last-Rev: 118e846 GitHub-Pull-Request: #188 Reviewed-on: https://go-review.googlesource.com/c/tools/+/207579 Run-TryBot: Rebecca Stambler <rstambler@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
I'll do workspace/symbol. |
This change adds command line support for workspace/symbol. Symbols are formatted as '{span} {name} {type}'. $ gopls workspace_symbol -matcher fuzzy 'wsymbols' $ $ workspacesymbol/a/a.go:5:7-31 WorkspaceSymbolConstantA Constant $ workspacesymbol/b/b.go:5:6-28 WorkspaceSymbolStructB Struct Optional arguments are: -matcher, which specifies the type of matcher: fuzzy, caseSensitive, or caseInsensitive. The default is caseInsensitive. Updates golang/go#32875 Change-Id: Ieef443b13710f9c973210e58f66ab7679f258b30
Change https://golang.org/cl/224677 mentions this issue: |
This change adds command line support for workspace/symbol. Symbols are formatted as '{span} {name} {type}'. $ gopls workspace_symbol -matcher fuzzy 'wsymbols' $ $ workspacesymbol/a/a.go:5:7-31 WorkspaceSymbolConstantA Constant $ workspacesymbol/b/b.go:5:6-28 WorkspaceSymbolStructB Struct Optional arguments are: -matcher, which specifies the type of matcher: fuzzy, caseSensitive, or caseInsensitive. The default is caseInsensitive. Updates golang/go#32875 Change-Id: Ieef443b13710f9c973210e58f66ab7679f258b30 Reviewed-on: https://go-review.googlesource.com/c/tools/+/224677 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Anyone is working on |
No, I don't believe anyone has worked on completion, so please feel free to work on it. |
Circling back, I don't think we should do this. Supporting features on the command line has a real cost:
But on the other hand, I never see requests for additional command-line features. So absent specific requests, I think we should not change the CLI. Tentatively closing this issue as it doesn't seem actionable. If you are reading this and wish that gopls had a specific command-line feature, please file a separate issue. |
gopls
features like find references, rename, etc. should work on the command line. Support for them should be added tointernal/lsp/cmd
. Right now, only definition and format are supported.The text was updated successfully, but these errors were encountered: