Skip to content

Commit 6fe074f

Browse files
maximeborgeseldruin
authored andcommitted
Add config for VSCode rust-analyzer
1 parent 958d742 commit 6fe074f

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,3 @@
22
**/*.orig
33
**/*.rs.bk
44
Cargo.lock
5-
6-
# VS Code
7-
/.vscode

.vscode/settings.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"rust.all_targets": false,
3+
"rust.target": "thumbv7em-none-eabihf",
4+
"rust.all_features": false,
5+
"rust.features": [
6+
"rtic",
7+
"stm32f767"
8+
],
9+
"rust-analyzer.checkOnSave.allTargets": false,
10+
"rust-analyzer.checkOnSave.extraArgs": [
11+
"--target",
12+
"thumbv7em-none-eabihf"
13+
],
14+
"rust-analyzer.cargo.features": [
15+
"rtic",
16+
"stm32f767"
17+
]
18+
}

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ features = ["stm32f767", "rt"]
5555

5656
The documentation can be found at [docs.rs/stm32f7xx-hal](https://docs.rs/stm32f7xx-hal/).
5757

58+
## VSCode
59+
60+
Default settings for `rust-analyzer` are set in [.vscode/settings.json](.vscode/settings.json) for `stm32f767`. If you're working on another chip, you can change the target there for convenience, but don't commit your change to this file.
61+
5862
## License
5963

6064
Licensed under either of

0 commit comments

Comments
 (0)