Rust: Difference between revisions
m Format table so the header is clearly distinguished from the rest of the rows. |
Add tip for using rust-analyzer from nixpkgs with the VS Code extension |
||
| Line 379: | Line 379: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | === VS Code integration === | ||
The [https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer rust- | The [https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer] VS Code extension offers Rust support. | ||
If you get the error <code>can't load standard library, try installing rust-src</code>, either configure <code>RUST_SRC_PATH</code> as shown above, or set <code>"rust-analyzer.server.path": "rust-analyzer"</code> in your VS Code settings to use rust-analyzer from nixpkgs rather than the one bundled with the extension. | |||
You can use the [https://marketplace.visualstudio.com/items?itemName=arrterian.nix-env-selector arrterian.nix-env-selector] extension to enable your nix-shell inside VSCode and have these settings picked up by other extensions. | You can use the [https://marketplace.visualstudio.com/items?itemName=arrterian.nix-env-selector arrterian.nix-env-selector] extension to enable your nix-shell inside VSCode and have these settings picked up by other extensions. | ||