From 73137b50fa470ab33800590fc5f1eb5ae4e19403 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sat, 7 May 2022 09:09:21 -0400 Subject: [PATCH] Add treefmt --- shell.nix | 7 ++++--- treefmt.toml | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 treefmt.toml diff --git a/shell.nix b/shell.nix index 5936b21..8efeb05 100644 --- a/shell.nix +++ b/shell.nix @@ -1,8 +1,9 @@ { pkgs ? import { }, ... }: pkgs.mkShell { - buildInputs = [ - pkgs.nixpkgs-fmt + buildInputs = with pkgs; [ + treefmt + nixpkgs-fmt # To enable webhint to analyze source files - pkgs.nodejs + nodejs ]; } diff --git a/treefmt.toml b/treefmt.toml new file mode 100644 index 0000000..8309d20 --- /dev/null +++ b/treefmt.toml @@ -0,0 +1,3 @@ +[formatter.nix] +command = "nixpkgs-fmt" +includes = ["*.nix"]