diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-06-11 08:00:45 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-06-11 08:00:45 +0200 |
commit | e4a334234b91f230571b5111a2b698230b27c660 (patch) | |
tree | 7545deca502c7ef7f676fc689f8caaeee6e19801 /templates/shell/treefmt.nix | |
parent | chore(templates/rust): Quickly Update [THIS WILL BE REBASED] (diff) | |
download | flake-templates-e4a334234b91f230571b5111a2b698230b27c660.tar.gz flake-templates-e4a334234b91f230571b5111a2b698230b27c660.zip |
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.
Diffstat (limited to 'templates/shell/treefmt.nix')
l---------[-rw-r--r--] | templates/shell/treefmt.nix | 74 |
1 files changed, 1 insertions, 73 deletions
diff --git a/templates/shell/treefmt.nix b/templates/shell/treefmt.nix index 1cbab40..94a5d85 100644..120000 --- a/templates/shell/treefmt.nix +++ b/templates/shell/treefmt.nix @@ -1,73 +1 @@ -{ - 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"]; - }; - }; - }; - } -) +../../common/files/treefmt.nix \ No newline at end of file |