Skip to content

Commit

Permalink
Add nixd.
Browse files Browse the repository at this point in the history
  • Loading branch information
Elias-Ainsworth committed Nov 11, 2024
1 parent 8997e62 commit 2489fe9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions modules/plugins/languages/nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 2489fe9

Please sign in to comment.