From 4b874b7343cd792b2287b706e7d91e813fc02aac Mon Sep 17 00:00:00 2001 From: winston Date: Tue, 21 May 2024 18:02:46 +0200 Subject: [PATCH] feat(vscode): inject nixd lsp path --- home/apps/vscode.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/home/apps/vscode.nix b/home/apps/vscode.nix index 82cb2b7..0f9415c 100644 --- a/home/apps/vscode.nix +++ b/home/apps/vscode.nix @@ -43,6 +43,21 @@ in # some default config patching to make these work without needing devShells all the time. # other extensions like Go/Rust are only really used with devShells, # nix & shell are universal enough for me to want them everywhere. + (jnoortheen.nix-ide.overrideAttrs (prev: { + nativeBuildInputs = prev.nativeBuildInputs ++ [ + pkgs.jq + pkgs.moreutils + ]; + postInstall = '' + cd "$out/$installPrefix" + jq -e ' + .contributes.configuration.properties."nix.enableLanguageServer".default = + "true" | + .contributes.configuration.properties."nix.serverPath".default = + "${pkgs.nixd}/bin/nixd" + ' < package.json | sponge package.json + ''; + })) (mads-hartmann.bash-ide-vscode.overrideAttrs (prev: { nativeBuildInputs = prev.nativeBuildInputs ++ [ pkgs.jq @@ -91,7 +106,6 @@ in graphql.vscode-graphql-syntax gruntfuggly.todo-tree hbenl.vscode-test-explorer - jnoortheen.nix-ide jock.svg leonardssh.vscord lunuan.kubernetes-templates