-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.treefmt.nix
More file actions
44 lines (41 loc) · 995 Bytes
/
Copy path.treefmt.nix
File metadata and controls
44 lines (41 loc) · 995 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ pkgs, ... }:
let
mdformatWithPlugins = pkgs.mdformat.withPlugins (ps: [
ps.mdformat-gfm
ps.mdformat-frontmatter
]);
in
{
projectRootFile = "flake.nix";
programs.shfmt.enable = true; # reads .editorconfig for style flags
programs.prettier = {
enable = true;
includes = [ "*.json" ];
};
programs.yamlfmt.enable = true;
programs.taplo.enable = true;
programs.nixfmt.enable = true;
# mdformat with plugins + wrap=keep via an explicit formatter entry, since the
# treefmt-nix mdformat module does not expose plugin wiring.
settings.formatter.mdformat = {
command = "${mdformatWithPlugins}/bin/mdformat";
options = [
"--wrap"
"keep"
];
includes = [ "*.md" ];
};
settings.global.excludes = [
"scripts/other/**"
"test/bats/**"
"test/test_helper/bats-support/**"
"test/test_helper/bats-assert/**"
".shdoc/**"
"site/**"
"lib/**"
".docs/**"
"flake.lock"
"LICENSE"
".gitmodules"
];
}