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

Updates to Cargo.toml not recognized #47

Open
JoshMcguigan opened this issue Nov 23, 2019 · 4 comments
Open

Updates to Cargo.toml not recognized #47

JoshMcguigan opened this issue Nov 23, 2019 · 4 comments

Comments

@JoshMcguigan
Copy link

Thanks for your work on coc!

As of rust-lang/rls#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

@JoshMcguigan
Copy link
Author

Tagging rust-lang/vscode-rust#364 as perhaps the resolution is the same, although that issue seems to have been opened before rls supported this functionality.

@ernie
Copy link

ernie commented Apr 18, 2022

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.

@ernie
Copy link

ernie commented Apr 18, 2022

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.

@ernie
Copy link

ernie commented Apr 18, 2022

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.

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

No branches or pull requests

2 participants