typescript-go icon indicating copy to clipboard operation
typescript-go copied to clipboard

Port `update imports on file rename/move` support

Open mjbvz opened this issue 3 weeks ago • 5 comments

Similar to #2227, update imports on file rename/move is one of those features that I really miss. Also can't easily be replaced by models right now

mjbvz avatar Dec 05 '25 19:12 mjbvz

Just tried tsgo's ls today and ran into this as well. It's unbelievably faster on our codebase though! Tempted to stick with it for now and just swap ls when I need to do a bunch of file renaming.

mmgeorge avatar Dec 06 '25 01:12 mmgeorge

I was messing with my neovim config and trying to get LSP renaming to work using workspace/didRenameFiles and could not figure out why it wouldn't work (when it did in the past with old LSP). Is this the reason? The tsgo port has not implemented didRenameFiles yet? Thanks!

GitMurf avatar Dec 09 '25 16:12 GitMurf

Yes, this LSP method is not implemented yet.

jakebailey avatar Dec 09 '25 16:12 jakebailey

Yes, this LSP method is not implemented yet.

@jakebailey WOW thanks for the quick response! Much appreciated.

After I sent my message I also realized that there has been inconsistency in the past with the TypeScript lsp ecosystem (for example the typescript language server VS the vtsls wrapper, etc.) along with other language servers in other languages, around how to implement proper file rename/move and import updates etc. between whether to use/implement workspace/didRenameFiles vs workspace/willRenameFiles.

Some LSP servers I believe even implement both 🤷‍♂️

Is there discussion (or decision) around how tsgo will do it? Happy to help with any testing as well from a Neovim perspective when the time comes (feel free to ping me).

GitMurf avatar Dec 09 '25 16:12 GitMurf

I assume we'd do it the same way as VS Code, just over LSP (which LSP is mostly a thin wrapper over).

jakebailey avatar Dec 09 '25 16:12 jakebailey