JetBrains Fleet 1.48 Help

Using rust-analyzer

rust-analyzer is an open-source implementation of a language server for the Rust programming language. It is designed to work with multiple code editors that support the Language Server Protocol (LSP), providing an enhanced Rust development experience.

Both rust-analyzer and Rust Language Server (RLS) serve as language servers for Rust. However, rust-analyzer is known for its faster performance and broader feature set. While RLS was the initial official language server for Rust, rust-analyzer has become the preferred option and is now considered the new standard. Since 2022, the Rust Language Server (RLS) has been deprecated in favor of rust-analyzer.

For more information about rust-analyzer, visit the official documentation.

Consider the following example using #[cfg(feature = "advanced")]. Without specifying the "rust-analyzer.cargo.features": ["advanced"] option in the settings.json file, the interpreter ignores the code following the attribute. These code blocks appear grayed out, as shown in the screenshot below:

When you add the rust-analyzer.cargo.features option to the settings.json file, the interpreter includes and processes these code fragments, as shown below:

Enabling rust-analyzer

To enable rust-analyzer, you need to add configuration options to settings.json.

  1. In the Files view, right-click the workspace root folder, then select New Folder. Name it .fleet.

  2. Right-click the .fleet directory, then select New File ⌘ N. Name the file settings.json.

  3. In braces {}, type rust-analyzer configuration options. For more information about configuration options, refer to Configuration at rust-analyzer.github.io.

    JetBrains Fleet supports autocompletion of rust-analyzer configuration options.

22 May 2025