Skip to content

Commit

Permalink
Merge pull request #2107 from alibektas/ratoml_for_rustlings
Browse files Browse the repository at this point in the history
Add rust-analyzer.toml file
  • Loading branch information
mo8it authored Sep 12, 2024
2 parents 2b7caf6 + 88e10a9 commit 45abd7d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`")?;

Expand Down Expand Up @@ -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/
Expand Down

0 comments on commit 45abd7d

Please sign in to comment.