-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename folder and update imports like _typescript.applyRenameFile
does
#641
Comments
Such functionality would have to be implemented mostly in the client so I don't really see the point of adding That's because server doesn't physically rename files (even for |
Thank you for the explanation. I'm still unfamiliar with how the internals of LSPs work, so your answer was very helpful! |
I found that tsserver does have support for directory rename: microsoft/TypeScript#24260. So maybe |
As far as I can see, the way it works in VSCode is: on directory rename, VSCode searches for relevant files in the renamed directory and returns the first one it finds. That path is then passed to the typescript API (in our case that would be |
No, the searched file is not passed to tsserver finally, the arguments only contain the renamed uris. The variable are named |
You are right. I've tested it now in VSCode with a directory structure like:
by renaming
The One thing that is likely needed (since it's done in VSCode) before triggering |
Is there a way to move a folder and update all the imports like
_typescript.applyRenameFile
does?A
_typescript.applyRenameFolder
command would be awesome.Thanks for your hard work!
The text was updated successfully, but these errors were encountered: