treefmt: fix config, add prettier-plugin-go-template

This commit is contained in:
Jan Kremer 2024-10-17 17:41:01 +02:00
parent 6ccec6f792
commit 9e8f680c52
Signed by: jan
GPG key ID: A7DA689CB3B078EC
10 changed files with 137 additions and 85 deletions

View file

@ -1,9 +1,27 @@
{ pkgs, ... }:
{
projectRootFile = "flake.nix";
programs = {
nixfmt.enable = true;
gofmt.enable = true;
taplo.enable = true;
prettier.enable = true;
prettier = {
enable = true;
settings = {
plugins = [
"${pkgs.prettier-plugin-go-template}/lib/node_modules/prettier-plugin-go-template/lib/index.js"
];
overrides = [
{
files = [ "*.html" ];
options.parser = "go-template";
}
];
};
};
};
settings.global.excludes = [
"public/**"
"static/**"
];
}