Skip to content

Commit d9d5081

Browse files
authored
Use stable toolchain for rust-analyzer on xtensa targets (#69)
* Use stable toolchain for rust-analyzer on xtensa targets * Make rust-analyzer invoke cargo and rustc with esp toolchain on xtensa targets * Update changelog
1 parent 19c9767 commit d9d5081

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
### Fixed
1818
- Verify the required options are provided (#65)
19+
- Use stable toolchain for rust-analyzer on xtensa targets (#69)
1920
- Added missing template substitution in devcontainer.json (#70)
2021

2122
### Removed

template/.helix/languages.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22
[[language]]
33
name = "rust"
44

5+
#IF option("xtensa")
6+
[language-server.rust-analyzer]
7+
environment.RUSTUP_TOOLCHAIN = "stable"
8+
9+
#ENDIF
510
[language-server.rust-analyzer.config]
611
check.allTargets = false
712
#REPLACE riscv32imac-unknown-none-elf rust_target
813
cargo.target = "riscv32imac-unknown-none-elf"
14+
#IF option("xtensa")
15+
check.extraEnv.RUSTUP_TOOLCHAIN = "esp"
16+
cargo.extraEnv.RUSTUP_TOOLCHAIN = "esp"
17+
#ENDIF

template/.vscode/settings.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
//INCLUDEFILE vscode
22
{
3-
"rust-analyzer.cargo.allTargets": false,
4-
//REPLACE riscv32imac-unknown-none-elf rust_target
5-
"rust-analyzer.cargo.target": "riscv32imac-unknown-none-elf",
6-
}
3+
"rust-analyzer.cargo.allTargets": false,
4+
//REPLACE riscv32imac-unknown-none-elf rust_target
5+
"rust-analyzer.cargo.target": "riscv32imac-unknown-none-elf",
6+
//IF option("xtensa")
7+
"rust-analyzer.server.extraEnv": {
8+
"RUSTUP_TOOLCHAIN": "stable"
9+
},
10+
"rust-analyzer.check.extraEnv": {
11+
"RUSTUP_TOOLCHAIN": "esp"
12+
},
13+
"rust-analyzer.cargo.extraEnv": {
14+
"RUSTUP_TOOLCHAIN": "esp"
15+
},
16+
//ENDIF
17+
}

0 commit comments

Comments
 (0)