mirror of
https://github.com/Noratrieb/nixos.git
synced 2026-01-14 11:45:06 +01:00
make r-a wrapper better
This commit is contained in:
parent
405b4b7330
commit
0c0ffec33a
1 changed files with 7 additions and 1 deletions
|
|
@ -17,8 +17,14 @@
|
||||||
# Language-specific
|
# Language-specific
|
||||||
"rust-analyzer.server.path" = lib.getExe (pkgs.writeShellApplication {
|
"rust-analyzer.server.path" = lib.getExe (pkgs.writeShellApplication {
|
||||||
name = "rust-analyzer-nightly-wrapper";
|
name = "rust-analyzer-nightly-wrapper";
|
||||||
|
# Ensure that we always use rust-analyzer from the nightly toolchain
|
||||||
|
# - in case a rust-toolchain.toml doens't have rust-analyzer
|
||||||
|
# - to ensure we get the latest fixes even if an older toolchain is used
|
||||||
|
# We can't do rust-analyzer +nightly, as that would inherit use of the nightly toolchain
|
||||||
|
# to all children of r-a, including cargo, which is very bad.
|
||||||
text = ''
|
text = ''
|
||||||
exec ${lib.getExe' pkgs.rustup "rust-analyzer"} +nightly
|
ra=$(${lib.getExe' pkgs.rustup "rustup"} +nightly which rust-analyzer)
|
||||||
|
exec "$ra"
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
"[nix]"."editor.formatOnSave" = true;
|
"[nix]"."editor.formatOnSave" = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue