From c5fab3f5821f479f14789622469fc0e00cd2c353 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 2 Nov 2024 18:51:41 +0100 Subject: feat(flake/treefmt.nix): Specify lua formatter settings --- flake/treefmt.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'flake') 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; -- cgit 1.4.1