neoclide / coc-rls

Rust language server support for coc.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rename functionality not working

simbados opened this issue · comments

commented

I am currently trying to get coc.nvim working with rust. Most features work fine, but I can not rename anything (variables or modules). I use the example config of coc.nvim and after the shortcut <leader> rn, I can confirm a new name. However, it will not apply the change. I assume this is because the language server might not be correctly setup, even though I used the described setup in the README. Do you have any hints, what could cause this problem?

commented

Thanks for the reply!
I am not sure, that I understand the instructions of the debugging.
How am I supposed to add the workspace.showOutput to the command?
I tried it with the shortcut and then providing the workspace.Output addition. But that is not working. What would be the steps necessary to get the debug information of the LSP?
Additionally, I tried to connect to the node.js server, but that does not work either, as I do not understand how I should tell the server to expose the debugging.

commented

I think the issue is related to #6.
My .git file is located in the parent directory of the rust directory.
I think the lsp does not recognize the cargo.toml file because of this.
Tried to use the fix that is described in the issue, but adding the "rootPatterns": ["Cargo.toml"],
did not fix the issue. Maybe my coc-settings is incorrect, do you have a minimal working coc-settings that I could try?

I am not able to rename as well, i get the below error when i rename an enum for example.

"Rename failed: RLS found nothing to rename - possibly due to multiple defs"

@simonschmoll did you manage to get it working?