diff --git a/flake.nix b/flake.nix index 2d1287c..4b40510 100644 --- a/flake.nix +++ b/flake.nix @@ -24,5 +24,6 @@ in { devShells.default = import ./shell.nix { inherit pkgs; }; + formatter = pkgs.treefmt; }); } diff --git a/treefmt.toml b/treefmt.toml new file mode 100644 index 0000000..137caa5 --- /dev/null +++ b/treefmt.toml @@ -0,0 +1,24 @@ +[formatter.nix] +command = "nixpkgs-fmt" +includes = ["*.nix"] + +[formatter.ruby] +command = "rufo" +options = ["-x"] +includes = ["*.rb"] + +[formatter.web] +command = "prettier" +options = ["--write"] +includes = [ + "*.css", + "*.html", + "*.js", + "*.json", + "*.jsx", + "*.md", + "*.mdx", + "*.scss", + "*.ts", + "*.yaml", +]