-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtreefmt.toml
More file actions
62 lines (52 loc) · 1.38 KB
/
treefmt.toml
File metadata and controls
62 lines (52 loc) · 1.38 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# treefmt configuration
# https://treefmt.com/
[formatter.shfmt]
command = "shfmt"
options = [
"--indent", "2", # Use 2-space indentation
"--case-indent", # Indent case statements
"--binary-next-line", # Put binary operators at start of next line
"--space-redirects", # Add space after redirection operators
"--write" # Write result to file instead of stdout
]
includes = ["*.sh", "*.bash"]
[formatter.prettier]
command = "prettier"
options = ["--write", "--prose-wrap", "never"]
includes = [
"*.md", "*.markdown", # Markdown files
"*.yml", "*.yaml", # YAML files
"*.json", # JSON files
]
[formatter.fourmolu]
command = "fourmolu"
options = ["--mode", "inplace"]
includes = ["*.hs", "*.lhs"]
[formatter.cabal-fmt]
command = "cabal-fmt"
options = ["--inplace"]
includes = ["*.cabal"]
[formatter.nixfmt]
command = "nixfmt"
options = []
includes = ["*.nix"]
# Global settings
[global]
excludes = [
# Exclude nix-specific directories and files
"result",
"result-*",
".direnv/**",
# Exclude temporary and build directories
"node_modules/**",
"dist/**",
"build/**",
".git/**",
"dist-newstyle/**",
# Exclude specific files that shouldn't be formatted
"flake.lock",
# Exclude any auto-generated files
"**/*.generated.*",
# Exclude Slidev presentations (YAML frontmatter incompatible with Prettier)
"doc/slides/**"
]