coc-rls
coc-rls copied to clipboard
Updates to Cargo.toml not recognized
Thanks for your work on coc!
As of https://github.com/rust-lang/rls/pull/1246 rls supports cargo rebuilds, but this does not work in coc-rls.
To re-create this issue, create a new project, use a dependency in main.rs
, wait for the error about the dependency being unrecognized, update Cargo.toml
, see that the error doesn't go away.
Perhaps the issue is that when a language client instance is created we don't create a selector for toml
files? https://github.com/neoclide/coc-rls/blob/master/src/index.ts#L74
Tagging https://github.com/rust-lang/rls-vscode/issues/364 as perhaps the resolution is the same, although that issue seems to have been opened before rls supported this functionality.
Playing a bit with Rust and found coc-rls
. Ran into this while just working through the guessing game tutorial in the book after adding my first dependency. I'm not clear on if this project is being maintained and I don't have experience writing coc extensions or this comment would be accompanied by a PR, so I am sorry for resurrecting a very old issue in advance.
Just a quick update: as a workaround, it's possible to run :CocCommand rls.restart
when Cargo.toml changes, to avoid needing to relaunch the editor.
Last update: by reviewing the changes that were made to vscode-rust, I discovered they'd moved to rust-analyzer, which can be installed by :CocInstall coc-rust-analyzer
. Works great.