From a37a5138206607e8a01ee1cb76a566a1457ba901 Mon Sep 17 00:00:00 2001 From: Tomo <68489118+Tomodachi94@users.noreply.github.com> Date: Sun, 19 May 2024 20:05:31 -0700 Subject: [PATCH] treewide: install taplo --- lib/shells.nix | 1 + lib/tooling-config/selene.toml | 2 +- lib/tooling-config/statix.toml | 4 +--- lib/tooling-config/treefmt.toml | 24 ++++++++++++++++-------- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/lib/shells.nix b/lib/shells.nix index 3a43c5c..aaa7e77 100644 --- a/lib/shells.nix +++ b/lib/shells.nix @@ -2,6 +2,7 @@ let treefmt-deps = with pkgs; [ treefmt + taplo stylua statix deadnix diff --git a/lib/tooling-config/selene.toml b/lib/tooling-config/selene.toml index a982735..3d8de5a 100644 --- a/lib/tooling-config/selene.toml +++ b/lib/tooling-config/selene.toml @@ -1,4 +1,4 @@ -std="lua51+vim" +std = "lua51+vim" exclude = ["*/.direnv/*"] [lints] mixed_table = "allow" diff --git a/lib/tooling-config/statix.toml b/lib/tooling-config/statix.toml index 0a6543a..3f02ae4 100644 --- a/lib/tooling-config/statix.toml +++ b/lib/tooling-config/statix.toml @@ -1,3 +1 @@ -disabled = [ - "repeated_keys" -] +disabled = ["repeated_keys"] diff --git a/lib/tooling-config/treefmt.toml b/lib/tooling-config/treefmt.toml index 4cc394d..176ea9f 100644 --- a/lib/tooling-config/treefmt.toml +++ b/lib/tooling-config/treefmt.toml @@ -2,27 +2,35 @@ [formatter.stylua] command = "stylua" -options = [ "--config-path", "lib/tooling-config/stylua.toml" ] -includes = [ "*.lua" ] +options = ["--config-path", "lib/tooling-config/stylua.toml"] +includes = ["*.lua"] excludes = [] [formatter.statix] command = "sh" -options = ["-euc", "for file in \"$@\"; do statix fix --config lib/tooling-config/statix.toml \"$file\"; done"] -includes = [ "*.nix" ] +options = [ + "-euc", + "for file in \"$@\"; do statix fix --config lib/tooling-config/statix.toml \"$file\"; done", +] +includes = ["*.nix"] [formatter.deadnix] command = "deadnix" -includes = [ "*.nix" ] +includes = ["*.nix"] [formatter.nixpkgs-fmt] command = "nixpkgs-fmt" -includes = [ "*.nix" ] +includes = ["*.nix"] + +[formatter.taplo] +command = "taplo" +options = ["format"] +includes = ["*.toml"] [formatter.mdformat] command = "mdformat" -includes = [ "*.md" ] +includes = ["*.md"] [formatter.yamlfmt] command = "yamlfmt" -includes = [ "*.yaml", "*.yml" ] +includes = ["*.yaml", "*.yml"]