Add nixd.

Add nixd to flake.nix and legacyPackages.nix.

Format with alejandra.
This commit is contained in:
Elias Ainsworth 2024-11-10 21:47:58 -07:00
commit 3d1e38ccc0
4 changed files with 130 additions and 4 deletions

View file

@ -74,6 +74,22 @@
}
'';
};
nixd = {
package = pkgs.nixd;
internalFormatter = cfg.format.type == "nixpkgs-fmt";
lspConfig = ''
lspconfig.nixd.setup{
capabilities = capabilities,
${
if (cfg.format.enable && cfg.format.type == "nixpkgs-fmt")
then useFormat
else noFormat
},
cmd = ${packageToCmd cfg.lsp.package "nixd"},
}
'';
};
};
defaultFormat = "alejandra";