# Rust Analyzer Blocking Issue ## Metadata **Status**:: #x **Zettel**:: #zettel/fleeting **Created**:: [[2023-12-20]] ## Synopsis Rust Analyzer running in the background can cause blocking issue to run cargo in the command line. ### Global Proxy The blocking issue can be resolved when cargo runs fast. One major issue to slow down cargo is the network problem. A global proxy can be configured in `$HOME/.cargo/config.toml` ```toml [http] proxy = "10.31.0.6:7890" ``` ### Separated Profile Another solution is running the rust-analyzer in its own profile to avoid conflicting with common cargo commands. <https://github.com/rust-lang/rust-analyzer/issues/6007#issuecomment-1379342831> Add a new cargo profile in `$HOME/.cargo/config.toml` ```toml [profile.rust-analyzer] inherits = "dev" ``` Then configure editor to use the profile. Here is a example to configure rust-analyzer in neovim: ```lua require'lspconfig'.rust_analyzer.setup{ settings = { ['rust-analyzer'] = { checkOnSave = { extraArgs = ["--profile", "rust-analyzer"] } } } } ```