Files
nix-config/treefmt.nix
mjallen18 3c1a956c81 cleanup
2025-07-24 10:19:32 -05:00

82 lines
1.6 KiB
Nix

{
projectRootFile = "flake.nix";
programs = {
actionlint.enable = true;
biome = {
enable = true;
settings.formatter.formatWithErrors = true;
};
clang-format.enable = true;
deadnix = {
enable = true;
};
deno = {
enable = true;
# Using biome for these
excludes = [
"*.ts"
"*.js"
"*.json"
"*.jsonc"
];
};
fantomas.enable = true;
fish_indent.enable = true;
gofmt.enable = true;
isort.enable = true;
nixfmt.enable = true;
# nufmt.enable = true;
ruff-check.enable = true;
ruff-format.enable = true;
rustfmt.enable = true;
shfmt = {
enable = true;
indent_size = 4;
};
statix.enable = true;
stylua.enable = true;
taplo.enable = true;
yamlfmt.enable = true;
};
settings = {
global.excludes = [
"*.editorconfig"
"*.envrc"
"*.gitconfig"
"*.git-blame-ignore-revs"
"*.gitignore"
"*.gitattributes"
"*.luacheckrc"
"*CODEOWNERS"
"*LICENSE"
"*flake.lock"
"*.conf"
"*.gif"
"*.ico"
"*.ini"
"*.micro"
"*.png"
"*.svg"
"*.tmux"
"*/config"
# TODO: formatters?
"*.ac"
"*.css" # Exclude CSS files from formatting since we use Nix template variables
"*.csproj"
"*.fsproj"
"*.in"
"*.kdl"
"*.kvconfig"
"*.rasi"
"*.sln"
"*.xml"
"*.zsh"
"*Makefile"
"*makefile"
];
formatter.ruff-format.options = [ "--isolated" ];
};
}