Skip to content

Commit

Permalink
Add config for VSCode rust-analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
maximeborges authored and eldruin committed Jun 6, 2022
1 parent 958d742 commit 6fe074f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@
**/*.orig
**/*.rs.bk
Cargo.lock

# VS Code
/.vscode
18 changes: 18 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"rust.all_targets": false,
"rust.target": "thumbv7em-none-eabihf",
"rust.all_features": false,
"rust.features": [
"rtic",
"stm32f767"
],
"rust-analyzer.checkOnSave.allTargets": false,
"rust-analyzer.checkOnSave.extraArgs": [
"--target",
"thumbv7em-none-eabihf"
],
"rust-analyzer.cargo.features": [
"rtic",
"stm32f767"
]
}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ features = ["stm32f767", "rt"]

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

## VSCode

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.

## License

Licensed under either of
Expand Down

0 comments on commit 6fe074f

Please sign in to comment.