Skip to content

Commit c231380

Browse files
committed
feat: use .rustfmt.toml for formatting options
We previously did this with the `cargo fmt-stacks` command because these config options were not supported in .rustfmt.toml, but they are now supported by the nightly build. Using this directly is better than the alias because we do not need to remember to run the alias.
1 parent 0f3060e commit c231380

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.cargo/config.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[alias]
22
stacks-node = "run --package stacks-node --"
3-
fmt-stacks = "fmt -- --config group_imports=StdExternalCrate,imports_granularity=Module"
43
clippy-stacks = "clippy -p libstackerdb -p stacks-signer -p pox-locking -p clarity -p libsigner -p stacks-common --no-deps --tests --all-features -- -D warnings"
54

65
# Uncomment to improve performance slightly, at the cost of portability

.rustfmt.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
group_imports = "StdExternalCrate"
2+
imports_granularity = "Module"

.vscode/settings.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
2-
"lldb.adapterType": "native",
3-
"lldb.launch.sourceLanguages": ["rust"],
2+
"lldb.launch.sourceLanguages": [
3+
"rust"
4+
],
45
"rust-analyzer.runnables.extraEnv": {
56
"BITCOIND_TEST": "1"
6-
}
7+
},
8+
"rust-analyzer.rustfmt.extraArgs": [
9+
"+nightly"
10+
]
711
}

0 commit comments

Comments
 (0)