simrat39 / rust-tools.nvim

Tools for better development in rust using neovim's builtin lsp
MIT License
2.17k stars 158 forks source link

How to set `rust-analyzer.cargo.target`? #321

Closed jjant closed 1 year ago

jjant commented 1 year ago

Hi, I have a mixed native/wasm32-unknown-unknown project and #[cfg(target_arch = "wasm32")] blocks don't get analyzed.

Apparently you can set a rust-analyzer.cargo.target option for this but I don't see an easy way to do it with rust-tools (ideally based on my project's Cargo.toml or .cargo/config). Any ideas on how I can achieve this?

simrat39 commented 1 year ago

https://github.com/simrat39/rust-tools.nvim/wiki/Server-Configuration-Schema