forked from purescript/purescript-partial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtreefmt.nix
More file actions
43 lines (38 loc) · 1.07 KB
/
Copy pathtreefmt.nix
File metadata and controls
43 lines (38 loc) · 1.07 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
{ pkgs, ... }:
{
projectRootFile = "flake.nix";
# Nix — RFC 166 formatter.
programs.nixfmt.enable = true;
# Dhall — spago.dhall / packages.dhall layout.
programs.dhall.enable = true;
# PureScript — purs-tidy is not a first-class treefmt program, so wire it via
# the generic mechanism. It picks up `.tidyrc.json` from the project root.
settings.formatter.purs-tidy = {
command = "${pkgs.purs-tidy}/bin/purs-tidy";
options = [ "format-in-place" ];
includes = [ "*.purs" ];
};
# Lua FFI — LuaFormatter keeps the parentheses pslua's foreign-file parser
# requires (unlike StyLua, which strips them). Config in `.lua-format`.
settings.formatter.lua-format = {
command = "${pkgs.luaformatter}/bin/lua-format";
options = [
"-i"
"-c"
".lua-format"
];
includes = [ "*.lua" ];
};
# Never format generated output or vendored trees.
settings.global.excludes = [
"dist/*"
"output/*"
".spago/*"
"node_modules/*"
"*.lock"
"flake.lock"
"spago.lock"
".tidyrc.json"
".lua-format"
];
}