1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
Setup GuideThis guide gives a simplified opinionated setup for developers contributing to rust-analyzer using Visual Studio Code to make changes and Visual Studio Code Insiders to test those changes. This guide will assume you have Visual Studio Code and Visual Studio Code Insiders installed. PrerequisitesSince rust-analyzer is a Rust project, you will need to install Rust. You can download and install the latest stable version of Rust here. Step-by-Step SetupStep 01: Fork the rust-analyzer repository and clone the fork to your local machine. Step 02: Open the project in Visual Studio Code. Step 03: Open a terminal and run Step 04: Install the language server locally by running the following command: In the output of this command, there should be a file path provided to the installed binary on your local machine. It should look something like the following output below: In Visual Studio Code Insiders, you will want to open your User Settings (JSON) from the Command Palette. From there you should ensure that the The User Settings (JSON) file should contain the following: Now you should be able to make changes to rust-analyzer in Visual Studio Code and then view the changes in Visual Studio Code Insiders. Debugging rust-analyzerThe simplest way to debug rust-analyzer is to use the An example debugging statement could go into the Now, run the following commands to check the project and reinstall the server: Now on Visual Studio Code Insiders, we should be able to open the Output tab on our terminal and switch to Rust Analyzer Language Server to see the If you are able to see your output, you now have a complete workflow for debugging rust-analyzer. |