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: refactor.extract.variable fails at package level #70665

Closed
adonovan opened this issue Dec 3, 2024 · 2 comments
Closed

x/tools/gopls: refactor.extract.variable fails at package level #70665

adonovan opened this issue Dec 3, 2024 · 2 comments
Assignees
Labels
gopls Issues related to the Go language server, gopls. Refactoring Issues related to refactoring tools Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@adonovan
Copy link
Member

adonovan commented Dec 3, 2024

package p
var x = «1 + 2» // refactor.extract.variable: "cannot find location to insert extraction"

Ideally it would produce this output:

package p
var x1 = 1 + 2
var x = x1
@adonovan adonovan added the Refactoring Issues related to refactoring tools label Dec 3, 2024
@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 Dec 3, 2024
@gopherbot gopherbot added this to the Unreleased milestone Dec 3, 2024
@adonovan adonovan self-assigned this Dec 4, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/633597 mentions this issue: gopls/internal/golang: support extract variable at top level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Refactoring Issues related to refactoring tools Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants