

Now when you reload and start editing a Rust file you should see RLS: Analysis finished on the bottom bar and the completion and highlighting should all work.

In VSCode go to Settings using cmd-, and put the following config elements there:Īs the paths in the config need to be absolute, remember to adjust to your situation (system username) accordingly. If you’re greeted by this message: You have chosen RLS mode but neither RLS executable path is specified nor rustup is installed - then we need to get the extension to get to know your setup a bit: Check this by opening any Rust source code file. If you’re lucky - that’s it, you should have working completion and highlighting in Rust files. I’m using the new Rust extension as Rusty Code has been discontinued.
RUST FOR MAC OS X INSTALL
Now finally, for the VSCode itself, press cmd-p and ext install vscode-rust. Rustup component add rust-src -toolchain nightlyįor a more wholesome experience, please have some tools as well: cargo install clippy rustfmt rustsym Rustup component add rust-analysis -toolchain nightly rustup component add rls-preview -toolchain nightly We will need Rust Language Server to provide the code completion. This is mostly due to clippy requiring a nightly compiler. We will be using nightly version of rust as to have one version that can compile all of our tools. While on Linux VSCode with the Rust plugin seems to work more or less out of the box, on a Mac I needed to spend some time configuring it.įirst things first though, let’s start by installing Rust version manager, rustup.
