Add treefmt configuration
This commit is contained in:
parent
ff0ce9d94c
commit
b2395ce611
5 changed files with 158 additions and 31 deletions
30
treefmt.nix
Normal file
30
treefmt.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ ... }:
|
||||
{
|
||||
projectRootFile = "flake.nix";
|
||||
programs = {
|
||||
nixfmt.enable = true;
|
||||
deadnix.enable = true;
|
||||
jsonfmt.enable = true;
|
||||
yamlfmt.enable = true;
|
||||
mdformat.enable = true;
|
||||
ruff-check.enable = true;
|
||||
ruff-format.enable = true;
|
||||
shfmt.enable = true;
|
||||
};
|
||||
settings = {
|
||||
global.excludes =
|
||||
[
|
||||
"*.jpg"
|
||||
"*.pdf"
|
||||
"*.toml"
|
||||
]
|
||||
++ [
|
||||
".envrc"
|
||||
"robots.txt"
|
||||
".vscode/*"
|
||||
"nixos-modules/system/etc/*"
|
||||
"private/*"
|
||||
];
|
||||
formatter.jsonfmt.excludes = [ ".vscode/*.json" ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue