I use NeoVim with LSP Zero
plugin + Rust analyzer
for rust programming.
When I jump to a definition in some external crate (including std
) Nvim's diagnostic starts to show me all the errors from that crate.
For example, if I just create new project via cargo init some_project
, then open it via nvim some_project
and jump to the definition of println
macro, diagnostic starts to show me tons of this:
/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/lib.rs|100 col 1-32 error| `#![feature]` may not be used on the stable release channel
/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/lib.rs|100 col 12-30 error| `#![feature]` may not be used on the stable release channel
/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/lib.rs|101 col 12-30 error| `#![feature]` may not be used on the stable release channel
Also I tried use CoC
instead of native LSP, but it doesn't change anything.
What is correct way to disable diagnostic for crates outside my current workspace?