go
go copied to clipboard
x/tools/gopls: update package and imports on willRenameFiles/didRenameFiles
when I move go file between folders I want VSCode to automatically update package name and imports in go files that reference file being moved. Like it happens in Intellij Goland
Many thanks in advance for any feedback.
Thanks for the request. I agree this would be a useful feature, and I think it wouldn't be that hard to implement (provided we can capture the context correctly).
@hyangah is there an easy way for the VS Code Go extension to detect this type of move? We can add a gopls custom command to update the new file.
How about LSP's workspace/didRenameFiles or workspace/willRenameFIles?
It doesn't seem like gopls is utilizing this feature (available since LSP3.16) yet.
How about LSP's workspace/didRenameFiles or workspace/willRenameFIles
Oh, right, that's exactly what we need. Thanks!
Transfering to the Go issue tracker. This is a nice medium-sized project.
@suzmue Hi, I'm sorry @you. Is there any plan to release this function in the near future.