From e4a334234b91f230571b5111a2b698230b27c660 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Tue, 11 Jun 2024 08:00:45 +0200 Subject: refactor(common): Use symlinks to state, which files should be replaced Every symlink in the `./templates` directory is now replaced with the file it points to, making it obvious that this file should not be edited. --- templates/shell/treefmt.nix | 74 +-------------------------------------------- 1 file changed, 1 insertion(+), 73 deletions(-) mode change 100644 => 120000 templates/shell/treefmt.nix (limited to 'templates/shell/treefmt.nix') diff --git a/templates/shell/treefmt.nix b/templates/shell/treefmt.nix deleted file mode 100644 index 1cbab40..0000000 --- a/templates/shell/treefmt.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ - treefmt-nix, - pkgs, -}: -treefmt-nix.lib.evalModule pkgs ( - {pkgs, ...}: { - # Used to find the project root - projectRootFile = "flake.nix"; - - programs = { - alejandra.enable = true; - rustfmt.enable = true; - clang-format.enable = true; - mdformat.enable = true; - shfmt = { - enable = true; - indent_size = 4; - }; - shellcheck.enable = true; - prettier = { - settings = { - arrowParens = "always"; - bracketSameLine = false; - bracketSpacing = true; - editorconfig = true; - embeddedLanguageFormatting = "auto"; - endOfLine = "lf"; - # experimentalTernaries = false; - htmlWhitespaceSensitivity = "css"; - insertPragma = false; - jsxSingleQuote = true; - printWidth = 80; - proseWrap = "always"; - quoteProps = "consistent"; - requirePragma = false; - semi = true; - singleAttributePerLine = true; - singleQuote = true; - trailingComma = "all"; - useTabs = false; - vueIndentScriptAndStyle = false; - - tabWidth = 4; - overrides = { - files = ["*.js"]; - options.tabwidth = 2; - }; - }; - }; - stylua.enable = true; - ruff = { - enable = true; - format = true; - }; - taplo.enable = true; - }; - - settings = { - global.excludes = [ - "CHANGELOG.md" - "NEWS.md" - ]; - formatter = { - clang-format = { - options = ["--style" "GNU"]; - }; - shfmt = { - includes = ["*.bash"]; - }; - }; - }; - } -) diff --git a/templates/shell/treefmt.nix b/templates/shell/treefmt.nix new file mode 120000 index 0000000..94a5d85 --- /dev/null +++ b/templates/shell/treefmt.nix @@ -0,0 +1 @@ +../../common/files/treefmt.nix \ No newline at end of file -- cgit 1.4.1