Change formatter to nixfmt

This commit is contained in:
Natsu Kagami 2025-04-03 13:59:37 +02:00
parent 0b9fba73ea
commit fe4492f004
Signed by: nki
GPG key ID: 55A032EB38B49ADB
2 changed files with 26 additions and 25 deletions

View file

@ -240,8 +240,8 @@
# This is highly advised, and will prevent many possible mistakes
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
} // (inputs.flake-utils.lib.eachDefaultSystem (system: {
formatter = nixpkgs.legacyPackages.${system}.nixpkgs-fmt;
}
// (inputs.flake-utils.lib.eachDefaultSystem (system: {
formatter = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
}));
}

View file

@ -1,24 +1,25 @@
{ lib
, writeTextDir
, formats
, kak-lsp
, # LSP packages
ccls
, gopls
, nil
, nixpkgs-fmt
, python311Packages
, ltex-ls
, nodePackages
, tailwindcss-language-server
, fsautocomplete
, metals
, texlab
, tinymist
, marksman
, templ
, rust-analyzer
, ...
{
lib,
writeTextDir,
formats,
kak-lsp,
# LSP packages
ccls,
gopls,
nil,
nixfmt-rfc-style,
python311Packages,
ltex-ls,
nodePackages,
tailwindcss-language-server,
fsautocomplete,
metals,
texlab,
tinymist,
marksman,
templ,
rust-analyzer,
...
}:
let
# Configuration for kak-lsp
@ -75,7 +76,7 @@ let
filetypes = [ "nix" ];
roots = [ "flake.nix" "shell.nix" ".git" ];
settings.nil = {
formatting.command = [ "${lib.getExe nixpkgs-fmt}" ];
formatting.command = [ "${lib.getExe nixfmt-rfc-style}" ];
};
};
pylsp = {