-
Notifications
You must be signed in to change notification settings - Fork 2
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
vim.lsp.buf.rename
returns nil
on successful rename
#5
Comments
vim.lsp.buf.rename
returns nil
on successful rename
Hi Thomas, Thanks for reporting. The default lsp rename is If you’d like to have different behavior:
|
I think this is exactly what happens. Because transform_lsp_rename returns the result of EDIT: Actually it seems vim.lsp.buf.rename returns nothing. |
I'm busy at the moment, so I'll speculate and double check later.
Especially the rename not returning anything. That's weird.
Anyway, I believe there's a unit test for LSP rename. If what you are
saying is correct, then LSP rename would never work. You could consider
double checking on your side of LSP rename works on your end, but doesn't
work with Coerce.
…On Tue, May 28, 2024, 09:05 Thomas Da Costa ***@***.***> wrote:
It would only be a bug if LSP rename was working, but Coerce somehow
didn’t recognize or use that.
I think this is exactly what happens. Because transform_lsp_rename
<https://github.com/gregorias/coerce.nvim/blob/fdbc61acc81da3c7179e27d4122d5d794aeae2e5/lua/coerce/transformer.lua#L51>
returns the result of vim.lsp.buf.rename which is nil if the rename
succeed.
—
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFQLUOPUDYQWTGEHAJDRYTZEQUCZAVCNFSM6AAAAABILAKLQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZUGQ4DSMBWGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
While working on #5, I noticed that the failover parameter is unused. This commit rectifies this.
While working on #5, I noticed that the failover parameter is unused. This commit rectifies this.
Issue #5 has correctly pointed out that vim.lsp.buf.rename doesn’t return anything. This test starts the first half of the task: testing that we return false if rename fails.
Adds a test that will check #5 after I uncomment the TODO.
Hi @gregorias,
Thanks for this nice plugin!
I have an issue with the LSP rename function. I am using nvim 0.10 and pyright LSP server.
When I try to force a word it seems that the LSP rename is not called and only the local transformer is triggered. After some digging, it appears that the LSP rename is called but is overridden by the local transformer.
I think the problem comes from here as the
vim.lsp.buf.rename
returns nothing if the rename is done without errors.Regards,
The text was updated successfully, but these errors were encountered: