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: feature: "move declaration" refactoring #70583

Open
adonovan opened this issue Nov 26, 2024 · 3 comments
Open

x/tools/gopls: feature: "move declaration" refactoring #70583

adonovan opened this issue Nov 26, 2024 · 3 comments
Labels
FeatureRequest 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 Nov 26, 2024

A generalization of renaming a symbol X to Y is to rename X to otherpkg.Y, causing the declaration of X, along with any necessary supporting declarations, to be moved into some file in the designated other package. There are a fair number of edge cases to consider, and UI questions such as how best to obtain the name of otherpkg: the only current LSP operation that supports dialog is Rename, which rather forces our hand. (Another possibility is to use the web interface, which could give a rich interactive menu of which declarations should be moved and optionally renamed at the same time.)

@adonovan adonovan added Tools This label describes issues relating to any tools in the x/tools repository. Refactoring Issues related to refactoring tools gopls Issues related to the Go language server, gopls. labels Nov 26, 2024
@gopherbot gopherbot added this to the Unreleased milestone Nov 26, 2024
@gabyhelp
Copy link

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@adonovan adonovan modified the milestones: Unreleased, gopls, Backlog Nov 26, 2024
@xzbdmw
Copy link

xzbdmw commented Dec 3, 2024

+1 for web interface, also TextBased UI is interesting.

@adonovan
Copy link
Member Author

adonovan commented Dec 3, 2024

Aside: I think it is time we took matters into our own hands and discussed with other language-server maintainers what they would like to see in a protocol extension for dialog support. Then we can all implement it in our servers, and divide up the client-side work for various popular editors. It will be faster than waiting for something to happen on the LSP issue tracker; even PRs to contribute minor features on which there is broad consensus go neglected for months.

@findleyr findleyr added this to the gopls/backlog milestone Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest 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

5 participants