From 405b4b7330c44ba7cf02fe2a4e4cb4584e39b869 Mon Sep 17 00:00:00 2001 From: Noratrieb <48135649+Noratrieb@users.noreply.github.com> Date: Sun, 1 Jun 2025 12:13:38 +0200 Subject: [PATCH] always use nightly rust-analyzer to avoid depending on the current toolchain --- home-manager/vscode.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/home-manager/vscode.nix b/home-manager/vscode.nix index b7fbf42..b195c0d 100644 --- a/home-manager/vscode.nix +++ b/home-manager/vscode.nix @@ -15,7 +15,12 @@ userSettings = { # Note: In settings.json, `.` in a key is not equivalent to a nested object property. # Language-specific - "rust-analyzer.server.path" = lib.getExe' pkgs.rustup "rust-analyzer"; + "rust-analyzer.server.path" = lib.getExe (pkgs.writeShellApplication { + name = "rust-analyzer-nightly-wrapper"; + text = '' + exec ${lib.getExe' pkgs.rustup "rust-analyzer"} +nightly + ''; + }); "[nix]"."editor.formatOnSave" = true; "[nix]"."editor.defaultFormatter" = "jnoortheen.nix-ide"; "nix.enableLanguageServer" = true;