-
Notifications
You must be signed in to change notification settings - Fork 251
Fix references on rename and move #47
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
Comments
Is that for updating buffer after corresponding buffer has been renamed/moved? |
No, I think I actually have that already. This means that if the given file is imported into other files in your project, also fix those import statements to point to the new name. |
I don't think so, as renaming (Please hide those comments, I can open new issue for that just wanted to check for existing one :) |
Sorry I never responded to this. It seems like I remembered wrong and rename from neo-tree does not clean up buffers. This should probably be a separate issue. |
I've just noticed I posted a comment in the wrong issue 😅 My bad. I'll copy the comment from #308 as it is more relevant here. FYI I was able to implement this functionality for It may be worth adding this snippet to the documentation or the codebase so others can easily copy/require it and use it themselves. With this snippet, renaming/moving a file or directory in neo-tree automatically updates import paths in TypeScript. Keep in mind that the |
Use the LSP when available to fix references after (or before?) a file is moved or renamed.
https://github.com/jose-elias-alvarez/nvim-lsp-ts-utils/blob/main/lua/nvim-lsp-ts-utils/rename-file.lua
The text was updated successfully, but these errors were encountered: