Skip to content
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: include placeholder text for prepare rename for importspec #49302

Closed
suzmue opened this issue Nov 2, 2021 · 1 comment
Closed
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls.
Milestone

Comments

@suzmue
Copy link
Contributor

suzmue commented Nov 2, 2021

What version of Go are you using (go version)?

$ go version
go version go1.17.2 darwin/amd64
$ gopls version
golang.org/x/tools/gopls v0.7.3
    golang.org/x/tools/gopls@v0.7.3 h1:Lru57ht8vtDMouRskFC085VAjBAZRAISd/lwvwOOV0Q=

What did you do?

Rename "fmt" from import statement.

package main

import "fmt"

func main() {
   fmt.Println()
}

gopls trace:

[Trace - 15:47:09.130 PM] Sending request 'textDocument/prepareRename - (12)'.
Params: {"textDocument":{"uri":"file:///Users/suzmue/helloWorld/main.go"},"position":{"line":2,"character":9}}


[Trace - 15:47:09.131 PM] Received response 'textDocument/prepareRename - (12)' in 0ms.
Result: {"start":{"line":2,"character":7},"end":{"line":2,"character":7}}

The box pulls up with fmt as the text, but hitting enter on the rename does not send a rename request.

This is also a vscode issue, but in order to get the correct place holder text in more complicated package names gopls will need to return placeholder text anyway.

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Nov 2, 2021
@gopherbot gopherbot added this to the Unreleased milestone Nov 2, 2021
@suzmue suzmue removed the Tools This label describes issues relating to any tools in the x/tools repository. label Nov 2, 2021
@suzmue suzmue modified the milestones: Unreleased, gopls/unplanned Nov 2, 2021
@suzmue
Copy link
Contributor Author

suzmue commented Jun 27, 2022

This was fixed by https://go-review.googlesource.com/c/tools/+/360836.

@suzmue suzmue closed this as completed Jun 27, 2022
@findleyr findleyr modified the milestones: gopls/unplanned, gopls/v0.8.0 Jul 1, 2022
@golang golang locked and limited conversation to collaborators Jul 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls.
Projects
None yet
Development

No branches or pull requests

3 participants