about summary refs log tree commit diff stats
path: root/flake
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-02 18:51:41 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-02 18:53:04 +0100
commitc5fab3f5821f479f14789622469fc0e00cd2c353 (patch)
tree1bc6eddb90d9628e2ea5ff24605c88f73c17cfd6 /flake
parentfix(lib/maybeMerge): Actually output a warning if things will be overridden (diff)
downloadnixos-config-c5fab3f5821f479f14789622469fc0e00cd2c353.tar.gz
nixos-config-c5fab3f5821f479f14789622469fc0e00cd2c353.zip
feat(flake/treefmt.nix): Specify lua formatter settings
Diffstat (limited to 'flake')
-rw-r--r--flake/treefmt.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/flake/treefmt.nix b/flake/treefmt.nix
index 1cbab409..e2c6aeae 100644
--- a/flake/treefmt.nix
+++ b/flake/treefmt.nix
@@ -47,7 +47,20 @@ treefmt-nix.lib.evalModule pkgs (
           };
         };
       };
-      stylua.enable = true;
+      stylua = {
+        enable = true;
+        settings = {
+          sort_requires.enabled = true;
+          column_width = 120;
+          line_endings = "Unix";
+          indent_type = "Spaces";
+          indent_width = 2;
+          quote_style = "ForceDouble";
+          call_parentheses = "Always";
+          # space_after_function_names = "Never";
+          collapse_simple_statement = "Always";
+        };
+      };
       ruff = {
         enable = true;
         format = true;