Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ no_llvm_build
/llvm/
/mingw-build/
/build
/build-rust-analyzer/
/build-rust-analyzer
/dist/
/unicode-downloads
/target
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/src/core/build_steps/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ Select which editor you would like to set up [default: None]: ";
"198c195ed0c070d15907b279b8b4ea96198ca71b939f5376454f3d636ab54da5",
"1c43ead340b20792b91d02b08494ee68708e7e09f56b6766629b4b72079208f1",
"eec09a09452682060afd23dd5d3536ccac5615b3cdbf427366446901215fb9f6",
"b6143911d3ad8fd73a767f06a263e6ba7f1720f361a28b6e97266db8e21c042b",
],
EditorKind::Vim | EditorKind::VsCode => &[
"ea67e259dedf60d4429b6c349a564ffcd1563cf41c920a856d1f5b16b4701ac8",
Expand Down
5 changes: 2 additions & 3 deletions src/etc/rust_analyzer_helix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# To build rustfmt and proc macro server for r-a run the following command:
# ```
# x b proc-macro-srv-cli rustfmt --stage 0 --build-dir build-rust-analyzer
# x b proc-macro-srv-cli rustfmt --build-dir build-rust-analyzer
# ```

[language-server.rust-analyzer.config]
Expand All @@ -18,7 +18,6 @@ linkedProjects = [
]

[language-server.rust-analyzer.config.check]
invocationLocation = "root"
invocationStrategy = "once"
overrideCommand = [
"python3",
Expand Down Expand Up @@ -57,7 +56,7 @@ overrideCommand = [
"x.py",
"check",
"--json-output",
"--compile-time-deps",
"--build-dir",
"build-rust-analyzer",
"--compile-time-deps",
]
5 changes: 5 additions & 0 deletions src/tools/nix-dev-shell/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ pkgs.mkShell {
pkgs.nix
pkgs.glibc.out
pkgs.glibc.static
pkgs.rust-analyzer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

x
# Get the runtime deps of the x wrapper
] ++ lists.flatten (attrsets.attrValues env);

shellHook = ''
export PATH=$(pwd)/build/host/stage0/bin:$PATH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is happening here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

'';

env = {
# Avoid creating text files for ICEs.
RUSTC_ICE = 0;
Expand Down
Loading