From 5e65df256ade777f2a2c877277d00ae25b8a91a6 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Mon, 12 Jun 2023 03:48:15 -0400 Subject: [PATCH] meta: Add treefmt --- modules/fish-starship/default.nix | 1 + treefmt.toml | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 treefmt.toml diff --git a/modules/fish-starship/default.nix b/modules/fish-starship/default.nix index 35254680..f66777fe 100644 --- a/modules/fish-starship/default.nix +++ b/modules/fish-starship/default.nix @@ -63,6 +63,7 @@ let VARIABLES = import ../../src/variables.nix; in { vm = /* fish */ ''cd ~/nix-config && crystal spec tests/main.cr --progress --verbose --tag local && nixos-rebuild build-vm --flake . --verbose && ./result/bin/run-${VARIABLES.hostname}-vm && trash put result ${VARIABLES.hostname}.qcow2''; sw = "cd ~/nix-config && crystal spec tests/main.cr --progress --verbose --tag local && sudo nixos-rebuild switch --flake . --verbose"; st = "cd ~/nix-config && crystal spec tests/main.cr --progress --verbose --tag local"; + tf = "treefmt"; c = "tput clear"; # Clear the terminal completely e = "exit"; diff --git a/treefmt.toml b/treefmt.toml new file mode 100644 index 00000000..a42c0528 --- /dev/null +++ b/treefmt.toml @@ -0,0 +1,8 @@ +[formatter.crystal] +command = "crystal" +options = ["tool", "format"] +includes = [ "*.cr" ] + +[formatter.nix] +command = "nixpkgs-fmt" +includes = [ "*.nix" ]