-
Notifications
You must be signed in to change notification settings - Fork 71
Adding rustc_private = true
to Global Cargo.toml to Allow Parsing in Some lsp-based IDE/editor Backends
#428
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
Comments
Adding these lines doesn't fix the issue for me (I use neovim and nvm-lspconfig). Maybe you could add this setting directly in your editor-specific LSP config until we find a proper fix that also works in neovim? |
Further Comments to the Original Question
My QuestionsSo how what configurations do you use to have it indexed properly now? |
I got rust-analyzer working in neovim a while back. I needed to do two things:
For require('lspconfig').rust_analyzer.setup{
settings = {
['rust-analyzer'] = {
-- add this section
rustc = {
source = "discover",
},
},
},
} The way I see it, there are two things that need to change. First, we need to add these lines into |
@sadlerap: Thanks, now it works for me! @tempdragon: Please open a PR with the change and I'll accept it. |
Fixed in #447. |
I noticed that on Emacs, the
rustc_codegen_gcc
along with some other rustc-related libraries/projects can be correctly parsed with the following lines added toCargo.toml
,according to rust-analyzer manual (Search for "rustc_private" if you can't see it directly.).
Otherwise, the rust-analyzer will fail to parse with
unresolved external crate
for rustc-related crates.Since there is probably other methods to allow the correct analysis in your IDE without this line, could you please give me some hints about how to have them parse the gcc backend correctly if you choose not to add these lines?
Thanks in advance.
The text was updated successfully, but these errors were encountered: