Page 1 of 1

Rust language server (Rust Analyzer)

Posted: 23 Feb 2023 13:35
by Rickard Johansson
Rust Analyzer
At its core, rust-analyzer is a library for semantic analysis of Rust code as it changes over time. But it's also used as a server that implements the Language Server Protocol (LSP).

Install
* Install Rust from https://rustup.rs.
* Install Rust-Analyzer

Code: Select all

  From command prompt (as administrator?) run
    >rustup component add rust-analyzer
Add the server in project/sites settings

Server name
Rust language server

Command
rust-analyzer.exe

Initial folder
%homepath%\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin

Command line arguments

File extension and language id
.rs=rust

Communication channel
* Command line (stdio)

Source folders
<Path to a Rust project. It may require a Cargo.toml file>

Initialize options
{"cargo":{"buildScripts":{"enable":true,},},"procMacro":{"enable":true,}}

More information: https://rust-analyzer.github.io/manual. ... ver-binary