mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
Merge branch 'main' into feat-blink
This commit is contained in:
commit
f192344f7d
6 changed files with 49 additions and 36 deletions
|
@ -59,6 +59,40 @@
|
|||
}
|
||||
'';
|
||||
};
|
||||
|
||||
nixd = {
|
||||
package = pkgs.nixd;
|
||||
internalFormatter = true;
|
||||
lspConfig = ''
|
||||
lspconfig.nixd.setup{
|
||||
capabilities = capabilities,
|
||||
${
|
||||
if cfg.format.enable
|
||||
then useFormat
|
||||
else noFormat
|
||||
},
|
||||
cmd = ${packageToCmd cfg.lsp.package "nixd"},
|
||||
${optionalString cfg.format.enable ''
|
||||
settings = {
|
||||
nixd = {
|
||||
${optionalString (cfg.format.type == "alejandra")
|
||||
''
|
||||
formatting = {
|
||||
command = {"${cfg.format.package}/bin/alejandra", "--quiet"},
|
||||
},
|
||||
''}
|
||||
${optionalString (cfg.format.type == "nixfmt")
|
||||
''
|
||||
formatting = {
|
||||
command = {"${cfg.format.package}/bin/nixfmt"},
|
||||
},
|
||||
''}
|
||||
},
|
||||
},
|
||||
''}
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
defaultFormat = "alejandra";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue