nvim-lsp-file-operations
nvim-lsp-file-operations copied to clipboard
It doesn't work when moving the file
It works great when you rename a file, but renaming a folder in the path or moving a file to a different location won't.
Hey, @vricop ! Can you give a bit more context, please. What language server are you using? Did you try to check debug logs?
My best guess is that your language server doesn't support folder rename yet. I saw only a few that do support it. If that is the case you can try to create as issue there
Hey, @vricop ! Can you give a bit more context, please. What language server are you using? Did you try to check debug logs?
My best guess is that your language server doesn't support folder rename yet. I saw only a few that do support it. If that is the case you can try to create as issue there
Sorry, my bad, I'll find some time in the weekend to explain it better.
I hit the same thing. Makes sense that this is something that slipped through the cracks for tsserver. It's not so bad but it'd be really nice to have. It means I gotta be a bit more thoughtful naming my directory structures, and will make me tend to use somewhat fewer directories. I'm loving the ease with which individual files can be renamed with this thing though. I had issues getting it working for neo-tree, but nvim-tree is solid at handling the events.
Hey, @vricop ! Can you give a bit more context, please. What language server are you using? Did you try to check debug logs? My best guess is that your language server doesn't support folder rename yet. I saw only a few that do support it. If that is the case you can try to create as issue there
Sorry, my bad, I'll find some time in the weekend to explain it better.
I'm using Typescript. When moving a file/folder to a different location it won't update imports. That's what I meant.
For me moving (renaming) a file across the repo works, but moving a whole folder doesn't (like your OP states)
I'm experiencing the same problem, using basedpyright with both neo-tree.nvim and triptych.nvim. Renaming files works well (r action in neo-tree.nvim), but moving them (x + p action in neo-tree.nvim) does not trigger the correct import fixes.
Maybe try manually reloading the plugin with :Lazy reload nvim-lsp-file-operations? See #44.