summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Bektas <bektasali@protonmail.com>2024-09-12 15:26:40 +0200
committerAli Bektas <bektasali@protonmail.com>2024-09-12 15:26:40 +0200
commit1f624d4c2a4ee0441ffce842591a8e37e329d309 (patch)
tree8c699e55467a7b7b64a0ed58f0eb95e66e3a8e15
parent2b7caf6fcb7fc128bc5c0be93913d3482c87b35b (diff)
Add rust-analyzer.toml file
-rw-r--r--dev-rust-analyzer.toml4
-rw-r--r--src/init.rs4
2 files changed, 8 insertions, 0 deletions
diff --git a/dev-rust-analyzer.toml b/dev-rust-analyzer.toml
new file mode 100644
index 0000000..b0b88fa
--- /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 332bf52..24dcfa6 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`")?;