File tree Expand file tree Collapse file tree 6 files changed +46
-1
lines changed Expand file tree Collapse file tree 6 files changed +46
-1
lines changed Original file line number Diff line number Diff line change
1
+ # EditorConfig is awesome: https://EditorConfig.org
2
+
3
+ # top-most EditorConfig file
4
+ root = true
5
+
6
+ [* .nix ]
7
+ indent_style = space
8
+ indent_size = 2
9
+ end_of_line = lf
10
+ charset = utf-8
11
+ trim_trailing_whitespace = true
12
+ insert_final_newline = true
Original file line number Diff line number Diff line change
1
+ name : treefmt
2
+ on :
3
+ pull_request :
4
+ push :
5
+ branches : develop
6
+ jobs :
7
+ formatter :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - uses : actions/checkout@v4
11
+ - uses : cachix/install-nix-action@v31
12
+ with :
13
+ nix_path : nixpkgs=channel:nixos-unstable
14
+ - name : treefmt
15
+ run : nix-shell -p treefmt --run "treefmt --ci"
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ __pycache__/
17
17
result *
18
18
.env-local
19
19
.history
20
-
20
+ .envrc
21
21
22
22
# IDE
23
23
.idea /
Original file line number Diff line number Diff line change
1
+ repos :
2
+ - repo : local
3
+ hooks :
4
+ - id : treefmt
5
+ name : treefmt
6
+ entry : treefmt
7
+ language : system
8
+ types : [file]
Original file line number Diff line number Diff line change 1412
1412
trigger-nix-build = mkApp "trigger-nix-build" "trigger-nix-build" ;
1413
1413
} ;
1414
1414
1415
+ formatter = pkgs . treefmt ;
1416
+
1415
1417
# 'devShells.default' lists the set of packages that are included in the
1416
1418
# ambient $PATH environment when you run 'nix develop'. This is useful
1417
1419
# for development and puts many convenient devtools instantly within
1454
1456
basePackages . run-testinfra
1455
1457
basePackages . cleanup-ami
1456
1458
dbmate
1459
+ formatter # treefmt
1460
+ nixpkgs-fmt
1457
1461
nushell
1462
+ pre-commit
1458
1463
pythonEnv
1459
1464
] ;
1460
1465
shellHook = ''
Original file line number Diff line number Diff line change
1
+ # One CLI to format the code tree - https://github.com/numtide/treefmt
2
+
3
+ [formatter .nix ]
4
+ command = " nixpkgs-fmt"
5
+ includes = [" *.nix" ]
You can’t perform that action at this time.
0 commit comments