Tweak nix shell & helix config#147848
Conversation
|
|
This comment has been minimized.
This comment has been minimized.
28f077d to
ae6e555
Compare
| ] ++ lists.flatten (attrsets.attrValues env); | ||
|
|
||
| shellHook = '' | ||
| export PATH=$(pwd)/build/host/stage0/bin:$PATH |
There was a problem hiding this comment.
This adds stage0 tools (rustc, cargo) to path. This allows r-a to pick them up, which is arguably the right thing (rustc should be compiled by stage0).
There was a problem hiding this comment.
I don't want stage0 rustc in my path 😨, I want rustup rustc in my path which I can use properly to use my linked toolchains and everything
There was a problem hiding this comment.
So, the issue I'm running into is this: I don't use rustup. therefore r-a picks up cargo/rustc from $PATH. I want it to pick up the stage0 stuff.
I agree that this hack is awful, but I'm not sure what would be a proper solution. I've skimmed comments on rust-lang/rust-analyzer#3154 and it seems like all solutions assume rustup...
There was a problem hiding this comment.
Is there anything stopping you from just using rustup in the shell?
This will break using rustc directly so that seems really bad
There was a problem hiding this comment.
nothing is technically stopping me, I just don't want to use rustup ^^'
either way, I removed this. I fixed the problem on my side by adding the following to my helix config:
[language-server.rust-analyzer.environment]
RUSTC = "/home/wffl/prog/rust-r/build/host/stage0/bin/rustc"
CARGO = "/home/wffl/prog/rust-r/build/host/stage0/bin/cargo"| pkgs.nix | ||
| pkgs.glibc.out | ||
| pkgs.glibc.static | ||
| pkgs.rust-analyzer |
There was a problem hiding this comment.
I feel like this goes towards an aspect of editor configuration that is the users responsibility and not the projects, though I guess having the package around doesn't hurt even when it's unused.
There was a problem hiding this comment.
Yeah, idk about this too. The reason I added this is that I want for the shell to work with 0 outside setup, including having any tools (like r-a or even cargo).
There was a problem hiding this comment.
@Noratrieb should I remove this from this PR?
ae6e555 to
294ae3f
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
294ae3f to
8815d57
Compare
|
r=me on helix settings, I have no clue about Nix so, I cannot review it. |
r? Noratrieb