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

Open
suzmue opened this issue Nov 2, 2021 · 0 comments
Open

x/tools/gopls: include placeholder text for prepare rename for importspec #49302

suzmue opened this issue Nov 2, 2021 · 0 comments
Labels

Comments

@suzmue
Copy link
Contributor

@suzmue 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 this to the Unreleased milestone Nov 2, 2021
@suzmue suzmue removed the Tools label Nov 2, 2021
@suzmue suzmue removed this from the Unreleased milestone Nov 2, 2021
@suzmue suzmue added this to the gopls/unplanned milestone Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants