diff --git a/dev-rust-analyzer.toml b/dev-rust-analyzer.toml new file mode 100644 index 00000000..b0b88fae --- /dev/null +++ b/dev-rust-analyzer.toml @@ -0,0 +1,4 @@ +# rust-analyzer configuration file +# DO NOT edit what is already defined. +# You may add new configurations as needed. +check.extraArgs = ["--profile", "test"] diff --git a/src/init.rs b/src/init.rs index 332bf52e..24dcfa68 100644 --- a/src/init.rs +++ b/src/init.rs @@ -130,6 +130,10 @@ pub fn init() -> Result<()> { fs::write("Cargo.toml", updated_cargo_toml) .context("Failed to create the file `rustlings/Cargo.toml`")?; + let ra_toml = include_str!("../dev-rust-analyzer.toml"); + fs::write("rust-analyzer.toml", ra_toml) + .context("Failed to create the file `rustlings/rust-analyzer.toml`")?; + fs::write(".gitignore", GITIGNORE) .context("Failed to create the file `rustlings/.gitignore`")?;