diff options
| author | mokou <mokou@fastmail.com> | 2022-04-14 11:15:04 +0200 |
|---|---|---|
| committer | mokou <mokou@fastmail.com> | 2022-04-14 11:15:04 +0200 |
| commit | 8f33dba9caaf59d19a174d39ec0373241807eb6e (patch) | |
| tree | 8251f5a6f2ddb40fc86f010876ad43eecd796d95 /README.md | |
| parent | 6c87dc82102ef7cc29ce8cf6370684cfd6668d92 (diff) | |
docs: write documentation for enabling rust-analyzer
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -124,6 +124,27 @@ rustlings list After every couple of sections, there will be a quiz that'll test your knowledge on a bunch of sections at once. These quizzes are found in `exercises/quizN.rs`. +## Enabling `rust-analyzer` + +`rust-analyzer` support is provided, but it depends on your editor +whether it's enabled by default. (RLS support is not provided) + +To enable `rust-analyzer`, you'll need to make Cargo build the project +with the `exercises` feature, which will automatically include the `exercises/` +subfolder in the project. The easiest way to do this is to tell your editor to +build the project with all features (the equivalent of `cargo build --all-features`). +For specific editor instructions: + +- **VSCode**: Add a `.vscode/settings.json` file with the following: +```json +{ + "rust-analyzer.cargo.features": ["exercises"] +} +``` +- **IntelliJ-based Editors**: Using the Rust plugin, everything should work + by default. +- _Missing your editor? Feel free to contribute more instructions!_ + ## Continuing On Once you've completed Rustlings, put your new knowledge to good use! Continue practicing your Rust skills by building your own projects, contributing to Rustlings, or finding other open-source projects to contribute to. |
