diff --git a/README.md b/README.md index df58025..52183a1 100644 --- a/README.md +++ b/README.md @@ -222,7 +222,7 @@ functions. -`treefmt-nix` currently supports 120 formatters: +`treefmt-nix` currently supports 119 formatters: * [actionlint](programs/actionlint.nix) * [aiken](programs/aiken.nix) @@ -336,7 +336,6 @@ functions. * [texfmt](programs/texfmt.nix) * [toml-sort](programs/toml-sort.nix) * [typos](programs/typos.nix) -* [typstfmt](programs/typstfmt.nix) * [typstyle](programs/typstyle.nix) * [xmllint](programs/xmllint.nix) * [yamlfmt](programs/yamlfmt.nix) diff --git a/examples/formatter-actionlint.toml b/examples/formatter-actionlint.toml new file mode 100644 index 0000000..d921981 --- /dev/null +++ b/examples/formatter-actionlint.toml @@ -0,0 +1,6 @@ +# Example generated by ../examples.sh +[formatter.actionlint] +command = "actionlint" +excludes = [] +includes = [".github/workflows/*.yml", ".github/workflows/*.yaml"] +options = [] diff --git a/examples/formatter-typstfmt.toml b/examples/formatter-typstfmt.toml deleted file mode 100644 index 0185585..0000000 --- a/examples/formatter-typstfmt.toml +++ /dev/null @@ -1,6 +0,0 @@ -# Example generated by ../examples.sh -[formatter.typstfmt] -command = "typstfmt" -excludes = [] -includes = ["*.typ", "*.typst"] -options = [] diff --git a/examples/formatter-zig.toml b/examples/formatter-zig.toml new file mode 100644 index 0000000..54985de --- /dev/null +++ b/examples/formatter-zig.toml @@ -0,0 +1,6 @@ +# Example generated by ../examples.sh +[formatter.zig] +command = "zig" +excludes = [] +includes = ["*.zig", "*.zon"] +options = ["fmt"] diff --git a/flake.lock b/flake.lock index 96134d0..82dbd4c 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1761236834, - "narHash": "sha256-+pthv6hrL5VLW2UqPdISGuLiUZ6SnAXdd2DdUE+fV2Q=", + "lastModified": 1764527385, + "narHash": "sha256-nA5ywiGKl76atrbdZ5Aucd8SjF/v8ew9b9QsC+MKL14=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d5faa84122bc0a1fd5d378492efce4e289f8eac1", + "rev": "23258e03aaa49b3a68597e3e50eb0cbce7e42e9d", "type": "github" }, "original": { diff --git a/programs/actionlint.nix b/programs/actionlint.nix index bf558de..156371e 100644 --- a/programs/actionlint.nix +++ b/programs/actionlint.nix @@ -1,7 +1,6 @@ -{ lib, mkFormatterModule, ... }: +{ mkFormatterModule, ... }: { meta.maintainers = [ "katexochen" ]; - meta.brokenPlatforms = lib.platforms.darwin; imports = [ (mkFormatterModule { diff --git a/programs/typstfmt.nix b/programs/typstfmt.nix deleted file mode 100644 index 5286644..0000000 --- a/programs/typstfmt.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ mkFormatterModule, ... }: -{ - meta.maintainers = [ ]; - - imports = [ - (mkFormatterModule { - name = "typstfmt"; - includes = [ - "*.typ" - "*.typst" - ]; - }) - ]; -} diff --git a/programs/zig.nix b/programs/zig.nix index d582eeb..b147462 100644 --- a/programs/zig.nix +++ b/programs/zig.nix @@ -1,8 +1,6 @@ -{ lib, mkFormatterModule, ... }: +{ mkFormatterModule, ... }: { meta.maintainers = [ ]; - # Broken on macOS - meta.brokenPlatforms = lib.platforms.darwin; imports = [ (mkFormatterModule { diff --git a/treefmt.nix b/treefmt.nix index f4270c3..6aede47 100644 --- a/treefmt.nix +++ b/treefmt.nix @@ -4,10 +4,10 @@ settings.global.excludes = [ "*.toml" ]; programs.deadnix.enable = true; - programs.deno.enable = pkgs.hostPlatform.system != "riscv64-linux"; + programs.deno.enable = pkgs.stdenv.hostPlatform.system != "riscv64-linux"; programs.mdsh.enable = true; programs.nixfmt.enable = true; - programs.shellcheck.enable = pkgs.hostPlatform.system != "riscv64-linux"; - programs.shfmt.enable = pkgs.hostPlatform.system != "riscv64-linux"; + programs.shellcheck.enable = pkgs.stdenv.hostPlatform.system != "riscv64-linux"; + programs.shfmt.enable = pkgs.stdenv.hostPlatform.system != "riscv64-linux"; programs.yamlfmt.enable = true; }