You can use Rust Analyzer to benefit from Rust support:
- Install Rust Language Server, by following these instructions:
-
Open the New Language Server Dialog. This can usually be found under the IDE settings related to Language Server Protocol (LSP). For more information, refer to the New Language Server Dialog documentation.
-
Select Rust Language Server as the template from the available options. This will populate the command field with a default command:
${BASE_DIR}/rust-analyzer.exefor Windows OS.sh -c ${BASE_DIR}/rust-analyzerfor other OS.
You need to adjust this command to point to the location of the extracted Rust Analyzer LSP asset.
-
Optional: You may also customize the mappings section:
or configuration section according to your preferences.
-
Click OK to apply the changes. You should now have Rust language support enabled in your IDE, with the Rust language server integrated, and you should see the language server in the LSP console:
LSP4IJ supports textDocument/semanticTokens.
See Semantic Tokens support for color settings and the Semantic Tokens Inspector.
You can also add the Rust TextMate grammar
in IntelliJ via the Editor / TextMate Bundles settings:
Clone https://github.com/microsoft/vscode and reference this folder (which contains the package.json) for extra syntax coloration and language configuration (matching brackets, etc).





