treefmt: fix config, add prettier-plugin-go-template
This commit is contained in:
parent
6ccec6f792
commit
9e8f680c52
10 changed files with 137 additions and 85 deletions
20
treefmt.nix
20
treefmt.nix
|
|
@ -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/**"
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue