Skip to content

Commit 23c1aa3

Browse files
author
Mohammod Al Amin Ashik
committed
chore: add VS Code auto-format and pre-commit hook
- Enable format on save for Rust files - Configure rust-analyzer to use rustfmt - Add pre-commit hook to auto-format Rust code before commits - Ensure consistent line endings (LF) and trim trailing whitespace
1 parent 77ca8c5 commit 23c1aa3

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.vscode/settings.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"[rust]": {
3+
"editor.formatOnSave": true,
4+
"editor.defaultFormatter": "rust-lang.rust-analyzer"
5+
},
6+
"rust-analyzer.rustfmt.extraArgs": [
7+
"+nightly"
8+
],
9+
"files.eol": "\n",
10+
"files.insertFinalNewline": true,
11+
"files.trimTrailingWhitespace": true,
12+
"editor.formatOnSave": true
13+
}

0 commit comments

Comments
 (0)