Merge branch 'NotAShelf:main' into feature-language-tex

This commit is contained in:
isaacST08 2025-02-10 17:45:36 -07:00 committed by GitHub
commit 1b983561a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 879 additions and 232 deletions

View file

@ -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";

View file

@ -82,7 +82,7 @@
ls_sources,
null_ls.builtins.formatting.prettier.with({
command = "${cfg.format.package}/bin/prettier",
filetypes = { "typescript" },
filetypes = { "typescript", "javascript" },
})
)
'';