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.)
Comment From: gabyhelp
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Comment From: xzbdmw
+1 for web interface, also TextBased UI is interesting.
Comment From: adonovan
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.