Closed michalfita closed 3 years ago
Nix-shell file and packages options exclude each other. Please unset the nixFile
parameter when using packages. Also, it seems you made a typo in the setting file path .vcode/settings.json
-> .vscode/settings.json
Also, it seems you made a typo in the setting file path
.vcode/settings.json
->.vscode/settings.json
Typo corrected, I finger-typed it, not copy&pasted. I've added that to the existing settings.json
.
Please unset the
nixFile
parameter when using packages.
Parameter of what? shell.nix
is maintained in the repo and contains all project's dependencies - trick is I cannot add rustup
there.
@michalfita You can use either the nix packages list or nixFile, but not both simultaneously. It will not work via nix-shell CLI too. I can suggest you use parametrized nix-shell to split project dependencies and setting up your local environment.
Describe the bug
This is a corner case, but I'm improvising here not seeing right solution anywhere else. VSCode's Rust Extension requires presence of
rustup
. I've added"nixEnvSelector.packages": ["rustup"]
to.vcode/settings.json
, but VSCode Extension do not seerustup
after restart. All happens with WSL and remote session.To Reproduce
Steps to reproduce the behavior:
"nixEnvSelector.packages": ["rustup"]
to.vscode/settings.json
shell.nix
rustup
.Expected behavior
Extension notices
rustup
and installsrls
orrust-analyzer
depending on settings.Screenshots
Environment:
Additional context
Under normal circumstances my development environment would be just deb packages installed from Ubuntu repository or manual installation of rustup. However, in conditions I'm working on at the moment Nix is used for all development environment and I'm trying to figure out best way to use VSCode with this.
Running
nix-shell -p rustup
and thencode .
on WSL2 terminal session work - VSCode sees the rustup.