diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-03-31 23:10:25 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-04-01 00:00:00 +0200 |
commit | ff14f9474303784518589fd0ea1ad4b44dbc7161 (patch) | |
tree | f57e0192e5d0b8461aa306fd52a9d102fb927508 /treefmt.nix | |
parent | feat(rust): Update to my SOTA (diff) | |
download | flake-templates-ff14f9474303784518589fd0ea1ad4b44dbc7161.tar.gz flake-templates-ff14f9474303784518589fd0ea1ad4b44dbc7161.zip |
feat(latex): Update to my current SOTA
Diffstat (limited to '')
-rw-r--r-- | treefmt.nix | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/treefmt.nix b/treefmt.nix new file mode 100644 index 0000000..3de59f8 --- /dev/null +++ b/treefmt.nix @@ -0,0 +1,70 @@ +{ + 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"]; + formatter = { + clang-format = { + options = ["--style" "GNU"]; + }; + shfmt = { + includes = ["*.bash"]; + }; + }; + }; + } +) |