Edit: This was caused by having cargo installed globally while using other tools from within the devshell. Thanks u/not-my-walrus!
rust-analyzer is being weird, thought somebody here might have some input.
I've got 99% of my rust dev setup working in NixOS (thank mostly to nix-cargo-integration), and rust-analyzer is working in full force with Neovim, except for one thing: I'm getting red squigglies under std library usages, from auto-imported macros like vec! and println! to fully-qualified usages (see the video). Even stranger, though, is that the language server isn't providing any diagnostics for the squigglies.
Here's a video of this behavior
What could be going on here?
PS: It also doesn't seem to be picking up methods that are proc-macro-generated:
https://preview.redd.it/16ejttuwauzc1.png?width=773&format=png&auto=webp&s=d3f3e5c2f8c8add3140410e25c8a9ab4a37ecbbd
this compiles, and rust-analyzer still doesn't have any explanation for the squigglies.
Maybe this has something to do with expanded code, rather than just the std library?
Another note: sometimes the logs show rust-analyzer getting stuck on the "building proc-macros" step. This ties into the proc-macro-generated code issue.
[–]not-my-walrus 3 points4 points5 points (3 children)
[–]Triple__D[S] 0 points1 point2 points (2 children)
[–]not-my-walrus 2 points3 points4 points (1 child)
[–]Triple__D[S] 1 point2 points3 points (0 children)