diff options
| author | vkcku <[email protected]> | 2026-06-01 09:33:02 +0530 |
|---|---|---|
| committer | vkcku <[email protected]> | 2026-06-01 09:33:02 +0530 |
| commit | fb9fbc79df26bb8d2d7562c197d425d6096a1c7d (patch) | |
| tree | d2a2dad14979fd5f818298b23374911a9e5888a8 /root/nix | |
| parent | root: add nix checks (diff) | |
root: configure markdown formatter
monorepo-revid: 4e858cdfd63675d8428ada557028684e8d039e21
Diffstat (limited to 'root/nix')
| -rw-r--r-- | root/nix/_treefmt-base.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/root/nix/_treefmt-base.nix b/root/nix/_treefmt-base.nix index d613092..21d7ea3 100644 --- a/root/nix/_treefmt-base.nix +++ b/root/nix/_treefmt-base.nix @@ -4,6 +4,31 @@ formatters/linters. This will NOT enable the formatters/linters except for a few that are used across all projects (nixfmt, typos etc.). */ +{ lib, pkgs, ... }: +let + rumdlConfig = (pkgs.formats.toml { }).generate "rumdl.toml" { + global = { + cache = false; + extend-enable = [ "MD060" ]; + }; + + MD013 = { + reflow = true; + reflow-mode = "normalize"; + }; + }; + + wrappedRumdl = pkgs.symlinkJoin { + name = "rumdl-wrapped"; + paths = [ pkgs.rumdl ]; + nativeBuildInputs = [ pkgs.makeBinaryWrapper ]; + postBuild = '' + makeBinaryWrapper "${pkgs.rumdl}/bin/rumdl" "$out/bin/rumdl" \ + --add-flags "--config ${rumdlConfig}" + ''; + meta.mainProgram = lib.getName pkgs.rumdl; + }; +in { projectRootFile = "README.md"; @@ -11,6 +36,10 @@ # keep-sorted start block=yes keep-sorted.enable = true; nixfmt.enable = true; + rumdl-check = { + enable = true; + package = wrappedRumdl; + }; typos.enable = true; # keep-sorted end }; |
