working devShell!
This commit is contained in:
parent
72a136dbd6
commit
8e2371ddf6
11 changed files with 21 additions and 19 deletions
34
parts/fmt.nix
Normal file
34
parts/fmt.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
perSystem = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# https://github.com/numtide/treefmt-nix?tab=readme-ov-file#flake-parts
|
||||
formatter = config.treefmt.build.wrapper;
|
||||
treefmt = {
|
||||
projectRootFile = "flake.nix";
|
||||
enableDefaultExcludes = true;
|
||||
programs = {
|
||||
alejandra.enable = true;
|
||||
|
||||
shellcheck.enable = true; # cannot be configured, errors on basic bash convention
|
||||
|
||||
prettier = {
|
||||
enable = true;
|
||||
package = pkgs.prettierd;
|
||||
excludes = ["*.age"];
|
||||
settings = {
|
||||
editorconfig = true;
|
||||
};
|
||||
};
|
||||
|
||||
shfmt = {
|
||||
enable = true;
|
||||
# https://flake.parts/options/treefmt-nix.html#opt-perSystem.treefmt.programs.shfmt.indent_size
|
||||
indent_size = 2; # set to 0 to use tabs
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue