feat(vscode): inject nixd lsp path

This commit is contained in:
winston 2024-05-21 18:02:46 +02:00
parent 3a7ee3e51a
commit 4b874b7343
Signed by: winston
GPG key ID: 3786770EDBC2B481

View file

@ -43,6 +43,21 @@ in
# some default config patching to make these work without needing devShells all the time. # 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, # other extensions like Go/Rust are only really used with devShells,
# nix & shell are universal enough for me to want them everywhere. # 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: { (mads-hartmann.bash-ide-vscode.overrideAttrs (prev: {
nativeBuildInputs = prev.nativeBuildInputs ++ [ nativeBuildInputs = prev.nativeBuildInputs ++ [
pkgs.jq pkgs.jq
@ -91,7 +106,6 @@ in
graphql.vscode-graphql-syntax graphql.vscode-graphql-syntax
gruntfuggly.todo-tree gruntfuggly.todo-tree
hbenl.vscode-test-explorer hbenl.vscode-test-explorer
jnoortheen.nix-ide
jock.svg jock.svg
leonardssh.vscord leonardssh.vscord
lunuan.kubernetes-templates lunuan.kubernetes-templates