diff options
| author | Mo <76752051+mo8it@users.noreply.github.com> | 2024-09-12 15:49:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-12 15:49:31 +0200 |
| commit | 45abd7d59eab34ae65fe40e7bc2f6cdfe2ba080e (patch) | |
| tree | f22b19d6b0d0ed97c6bc38b083e972918f224953 /src/init.rs | |
| parent | 2b7caf6fcb7fc128bc5c0be93913d3482c87b35b (diff) | |
| parent | 88e10a9e54eb06217a3c45d330b6a3ba66577b01 (diff) | |
Merge pull request #2107 from alibektas/ratoml_for_rustlings
Add rust-analyzer.toml file
Diffstat (limited to 'src/init.rs')
| -rw-r--r-- | src/init.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/init.rs b/src/init.rs index 332bf52..6322432 100644 --- a/src/init.rs +++ b/src/init.rs @@ -130,6 +130,9 @@ pub fn init() -> Result<()> { fs::write("Cargo.toml", updated_cargo_toml) .context("Failed to create the file `rustlings/Cargo.toml`")?; + fs::write("rust-analyzer.toml", RATOML) + .context("Failed to create the file `rustlings/rust-analyzer.toml`")?; + fs::write(".gitignore", GITIGNORE) .context("Failed to create the file `rustlings/.gitignore`")?; @@ -169,6 +172,11 @@ const INIT_SOLUTION_FILE: &[u8] = b"fn main() { } "; +const RATOML: &[u8] = br#"# rust-analyzer configuration file +# DO NOT edit what is already defined. +# You may add new configurations as needed. +check.extraArgs = ["--profile", "test"]"#; + const GITIGNORE: &[u8] = b"Cargo.lock target/ .vscode/ |
