-
Notifications
You must be signed in to change notification settings - Fork 33
Move a folder / Rename folder and update imports like TypescriptRenameFile
does
#53
Comments
This isn't supported by
I'm not sure if there's any interest in solving this upstream, but it might be worth opening an issue on the |
Thanks for your quick reply! I've just added an issue in the The recursive On a side note, how are you personally dealing with folder refactors? Old good search and replace for now? |
The biggest challenges were identifying which files did and didn't need to be handled and the fact a single failure could potentially leave the file tree in a weird, half-updated state.
To be perfectly honest: I run |
That makes sense. I haven't found VScode 100% reliable either, but it might be my local setup. |
We got an answer, confirming that it cannot be part of the language server:
I don't have much experience with lua other than crafting my nvim config, but I'm happy to help in any capacity to implement it. |
I see, thanks for following up. Their logic makes sense, so I think we can move forward with a solution here. I won't have time to work on this myself for at least a couple of weeks, but if you're interested in working on it, this is the approach I'd take: Instead of detecting if the user is trying to rename a directory, we can instead create a separate command, e.g.
We can pass the files from 1 to the existing Happy to provide guidance if you're interested in working on it, and if not I'll see what I can do once I have the time. |
Thanks for breaking down the new approach, it's really useful. I'll follow it and see how far I can get :-) I think I'll have some time next week to give it a try. I'll report back in a few days. |
Really interested by this feature, I've began hacking something together, and will open a PR soon. |
TypescriptRenameFile
, works beautifully, updating all the imports.Is there a way to move a folder/group of files at once and update all the imports?
If not, how do you guys deal with moving folders when refactoring?
Thanks for your awesome work!
The text was updated successfully, but these errors were encountered: