mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-15 08:31:04 +00:00
languages/nix: add nixd to supported LSP servers
Add nixd to flake.nix and legacyPackages.nix. Format with alejandra. Update flake.nix Undo change made by nixfmt-rfc-style Set nixd to follow flake-utils as well. Update nixd lspConfig
This commit is contained in:
parent
8997e62b3b
commit
bcab9c277c
4 changed files with 130 additions and 3 deletions
|
|
@ -74,6 +74,23 @@
|
|||
}
|
||||
'';
|
||||
};
|
||||
|
||||
nixd = {
|
||||
package = pkgs.nixd;
|
||||
internalFormatter = cfg.format.type == "nixpkgs-fmt";
|
||||
lspConfig = ''
|
||||
lspconfig.nixd.setup{
|
||||
capabilities = capabilities,
|
||||
on_attach = default_on_attach,
|
||||
${
|
||||
if (cfg.format.enable && cfg.format.type == "nixpkgs-fmt")
|
||||
then useFormat
|
||||
else noFormat
|
||||
},
|
||||
cmd = ${packageToCmd cfg.lsp.package "nixd"},
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
defaultFormat = "alejandra";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue