Skip to content
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

feat: support all LSP workspace file operations #264

Merged
merged 1 commit into from
Dec 23, 2023

Conversation

stevearc
Copy link
Owner

@stevearc stevearc commented Dec 23, 2023

Since neovim/neovim#26516 was not merged, we're pulling the relevant logic into oil.nvim.

Supercedes #260 and #261
closes #259
closes #262

@mehalter
Copy link
Contributor

Also correct me if I'm wrong, but I believe this also closes #262 since it moves the client requests to being synchronous

@mehalter
Copy link
Contributor

Hey just a heads up, I think there might be something going on with the didRename call. It seems to work with vtsls but I'm not getting it working with the lua language server. I also double checked the branch I had with all of the operations and it was working with the lua language server.

@stevearc
Copy link
Owner Author

@mehalter do you have a repro? I just checked it on one of my plugins and it seems to be working. Using LuaLS 3.7.0

@mehalter
Copy link
Contributor

Ah I can take a look in a few weeks. Just left for some international travel and won't touch a computer until Jan 9, 2024 😅 If you test it and it seems to work then I may have rushed through the test, but I was pretty sure I was careful. I can happily investigate and open a new issue in the new year if I come back and can't get it working!

@stevearc
Copy link
Owner Author

No worries, enjoy your travel! Please do file an issue later if you can't get it working

@stevearc stevearc merged commit 250e0af into master Dec 23, 2023
7 checks passed
@stevearc stevearc deleted the stevearc-lsp-file-operations branch December 23, 2023 22:08
@GitMurf
Copy link

GitMurf commented Jan 8, 2024

btw I tested this today and it did not rename my imports in a typescript project. i copied over the updated options for Oil adding in the section for LSP renames and then just renamed a file with Oil as usual and applied it. Was I supposed to do something else special to get the LSP rename to work? thanks a bunch for all the good work!

@stevearc
Copy link
Owner Author

stevearc commented Jan 8, 2024

@GitMurf one thing people often trip over is the LSP has to be started first. If you do a vim . and start moving files, the typescript LSP won't be active. You have to first open a typescript file, then move the files around with oil, then it should handle renaming the imports.

If that still doesn't work, file a bug report with a minimal repro config and the layout of a minimal typescript project

@GitMurf
Copy link

GitMurf commented Jan 9, 2024

@stevearc thanks for the advice. I definitely had a TS file open but it may have been a different file and not the one I renamed. Do you know if the file you are renaming has to be open? Thanks!

@stevearc
Copy link
Owner Author

stevearc commented Jan 9, 2024

No, one TS file open in the project should be sufficient

@mehalter
Copy link
Contributor

@stevearc just got back from my trip and did a test and lua language server is definitely not working. I'm opening a new issue currently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

question: should willRenameFiles be asynchronous? feature request: add LSP handler for didRenameFiles
3 participants