ray-x / go.nvim

G'day Nvimer, Joyful Gopher: Discover the Feature-Rich Go Plugin for Neovim
MIT License
2.07k stars 122 forks source link

gomvp - refactor packages / rename module, early though #176

Closed abenz1267 closed 1 year ago

abenz1267 commented 2 years ago

Hi,

i just created a little cli tool that helps refactoring/moving packages and renaming the module itself. It's literally just been released, but i figured you might be interested in adding that to go.nvim regardless.

https://github.com/abenz1267/gomvp

See here: https://drive.google.com/file/d/1GRDP6P5zhFADyiDlQVUWZMhPTrujHYQ5/view?usp=sharing

Regards

ray-x commented 2 years ago

Does the tool move all reference in the workspace and maybe .mod/sum from url_for_package_a to url_for_backage_b if I run gomvp url_for_package_a url_for_package_a

abenz1267 commented 2 years ago

It does indeed!

lijinglin3 commented 2 years ago

+1

ray-x commented 1 year ago

I added a new command Gomvp

abenz1267 commented 1 year ago

gopls just released a new version with experimental package renaming. https://github.com/golang/tools/releases

so i might deprecate gomvp in the near future.

mawkler commented 1 month ago

I would love it go.nvim supported gopls's native package renaming!

ray-x commented 1 month ago

Try GoRename

mawkler commented 1 month ago

@ray-x :GoRename seems to just rename the import, not the name of the file. I'm guessing that it just calls vim.lsp.buf.rename().

I'm looking for a a way to rename a file and have it propagate to all other files that import it 🙂