You can use Rust Analyzer to benefit from Rust
support:
by following these steps:
- 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.exe
for Windows OS.sh -c ${BASE_DIR}/rust-analyzer
for 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:
Today LSP4IJ doesn't support textDocument/semanticTokens
(please vote at issue 238), the demo
uses the Rust TextMate grammar
that you can configure in IntelliJ via the Editor / TextMate Bundles
settings.
You need to clone https://github.com/microsoft/vscode and reference this folder (which contains the package.json) to benefit from syntax coloration and language configuration (matching brackets, etc).