I have a file work.go
opened in vim-go
. It's in package oldpackagename
.
I want to refactor and rename it to newpackagename
. Is there some tooling for that? The reason is, the initial assumptions for oldpackagename
do not apply anymore.
I know I can do search and replace stuff, but usually either
GoRename
resp.nmap <leader>rn <Plug>(coc-rename)
work just fine on automatically renaming all occurrences.
But for the package name, I get:
vim-go: [rename] SUCCESS vim-go: cannot rename the identifier at the requested position for
GoRename
and:
[coc.nvim] Error on rename: The element can't be renamed. for
coc.nvim
.
Is package renaming different? Do I have to use search/replace or are my configs maybe corrupted?