feat: add treefmt-nix to dev flake - #708
Open
gabyx wants to merge 6 commits into
Open
Conversation
gabyx
force-pushed
the
feat/treefmt-nix
branch
2 times, most recently
from
July 25, 2026 10:07
ea9bfc5 to
2f400e9
Compare
gabyx
marked this pull request as ready for review
July 25, 2026 10:22
treefmt-nix to dev flake
Contributor
Author
|
@shivaraj-bh: Could you maybe run |
Member
|
@gabyx Why use |
Contributor
Author
|
@shivaraj-bh : Cause running hooks and formatting are two orthogonal things. Running hooks is fine but having one global process which formats treewide (with caching) is something which is not super easy achievable with hooks. Running the format step (the exact same treefmt build and not again another nixfmt hook) in pre-commit is however the better option IMO. Treefmt is awesome btw :). Once used you will probably deploy it everywhere :) (We did so and its a game changer :)) |
Malix-Labs
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Things Done
Closes: #707
treefmtsetup indevflake to format treewide all files.nixpkgssincetreefmt-nixneeds a newer input.devwithnix flake checkruns the formatting check. (Should be integrated in omnix by default?)nixpkgs-fmtwithtreefmtonpre-commit..prettierrc.yamlin root (could be maybe somewhere else ...) to format all markdown files consistently.How it works:
just formatwill format all files: Once happy with the setup one can format the files onmainin one commit. Thedocsfolder with the markdown files look well treated by prettier and there is not much to change I guess.Note: When merging, one should apply
just formaton main directly afterwards aschore: formatting all files treewideAssisted-by: no agent.