treefmt-nix
When working on large code trees, it's common to have multiple code formatters run against it. And have one script that loops over all of them. treefmt
makes that nicer.
- A unified CLI and output
- Run all the formatters in parallel.
- Cache which files have changed for super fast re-formatting.
- Just type treefmt in any folder and it reformats the whole code tree.
This module is defined in numtide/treefmt-nix
. The treefmt
repo is about the tool itself.
Installation
To use these options, add to your flake inputs:
treefmt-nix.url = "github:numtide/treefmt-nix";
and inside the mkFlake
:
imports = [
inputs.treefmt-nix.flakeModule
];
Run nix flake lock
and you're set.
Options
perSystem.treefmt.build.configFile
perSystem.treefmt.build.programs
perSystem.treefmt.build.wrapper
perSystem.treefmt.flakeFormatter
perSystem.treefmt.programs.alejandra.enable
perSystem.treefmt.programs.alejandra.package
perSystem.treefmt.programs.beautysh.enable
perSystem.treefmt.programs.beautysh.package
perSystem.treefmt.programs.beautysh.indent_size
perSystem.treefmt.programs.black.enable
perSystem.treefmt.programs.black.package
perSystem.treefmt.programs.buildifier.enable
perSystem.treefmt.programs.buildifier.package
perSystem.treefmt.programs.cabal-fmt.enable
perSystem.treefmt.programs.cabal-fmt.package
perSystem.treefmt.programs.clang-format.enable
perSystem.treefmt.programs.clang-format.package
perSystem.treefmt.programs.deadnix.enable
perSystem.treefmt.programs.deadnix.package
perSystem.treefmt.programs.deadnix.no-lambda-arg
perSystem.treefmt.programs.deadnix.no-lambda-pattern-names
perSystem.treefmt.programs.deadnix.no-underscore
perSystem.treefmt.programs.dhall.enable
perSystem.treefmt.programs.dhall.package
perSystem.treefmt.programs.dprint.enable
perSystem.treefmt.programs.dprint.package
perSystem.treefmt.programs.dprint.config.excludes
perSystem.treefmt.programs.dprint.config.extends
perSystem.treefmt.programs.dprint.config.includes
perSystem.treefmt.programs.dprint.config.incremental
perSystem.treefmt.programs.dprint.config.indentWidth
perSystem.treefmt.programs.dprint.config.lineWidth
perSystem.treefmt.programs.dprint.config.newLineKind
perSystem.treefmt.programs.dprint.config.plugins
perSystem.treefmt.programs.dprint.config.useTabs
perSystem.treefmt.programs.dprint.wrapper
perSystem.treefmt.programs.elm-format.enable
perSystem.treefmt.programs.elm-format.package
perSystem.treefmt.programs.erlfmt.enable
perSystem.treefmt.programs.erlfmt.package
perSystem.treefmt.programs.erlfmt.print-width
perSystem.treefmt.programs.gofmt.enable
perSystem.treefmt.programs.gofmt.package
perSystem.treefmt.programs.gofumpt.enable
perSystem.treefmt.programs.gofumpt.package
perSystem.treefmt.programs.gofumpt.extra
perSystem.treefmt.programs.google-java-format.enable
perSystem.treefmt.programs.google-java-format.package
perSystem.treefmt.programs.hclfmt.enable
perSystem.treefmt.programs.hclfmt.package
perSystem.treefmt.programs.hlint.enable
perSystem.treefmt.programs.hlint.package
perSystem.treefmt.programs.mdsh.enable
perSystem.treefmt.programs.mdsh.package
perSystem.treefmt.programs.nixfmt.enable
perSystem.treefmt.programs.nixfmt.package
perSystem.treefmt.programs.nixpkgs-fmt.enable
perSystem.treefmt.programs.nixpkgs-fmt.package
perSystem.treefmt.programs.ocamlformat.enable
perSystem.treefmt.programs.ocamlformat.package
perSystem.treefmt.programs.ocamlformat.configFile
perSystem.treefmt.programs.ocamlformat.pkgs
perSystem.treefmt.programs.ormolu.enable
perSystem.treefmt.programs.ormolu.package
perSystem.treefmt.programs.ormolu.ghcOpts
perSystem.treefmt.programs.prettier.enable
perSystem.treefmt.programs.prettier.package
perSystem.treefmt.programs.purs-tidy.enable
perSystem.treefmt.programs.purs-tidy.package
perSystem.treefmt.programs.ruff.enable
perSystem.treefmt.programs.ruff.package
perSystem.treefmt.programs.rufo.enable
perSystem.treefmt.programs.rufo.package
perSystem.treefmt.programs.rustfmt.enable
perSystem.treefmt.programs.rustfmt.package
perSystem.treefmt.programs.rustfmt.edition
perSystem.treefmt.programs.scalafmt.enable
perSystem.treefmt.programs.scalafmt.package
perSystem.treefmt.programs.shellcheck.enable
perSystem.treefmt.programs.shellcheck.package
perSystem.treefmt.programs.shfmt.enable
perSystem.treefmt.programs.shfmt.package
perSystem.treefmt.programs.shfmt.indent_size
perSystem.treefmt.programs.stylish-haskell.enable
perSystem.treefmt.programs.stylish-haskell.package
perSystem.treefmt.programs.stylua.enable
perSystem.treefmt.programs.stylua.package
perSystem.treefmt.programs.taplo.enable
perSystem.treefmt.programs.taplo.package
perSystem.treefmt.programs.terraform.enable
perSystem.treefmt.programs.terraform.package
perSystem.treefmt.programs.yamlfmt.enable
perSystem.treefmt.programs.yamlfmt.package
perSystem.treefmt.programs.zprint.enable
perSystem.treefmt.programs.zprint.package
perSystem.treefmt.programs.zprint.zprintOpts
perSystem.treefmt.projectRootFile
perSystem.treefmt.settings.formatter
perSystem.treefmt.settings.formatter.<name>.command
perSystem.treefmt.settings.formatter.<name>.excludes
perSystem.treefmt.settings.formatter.<name>.includes
perSystem.treefmt.settings.formatter.<name>.options
perSystem.treefmt.settings.global.excludes
perSystem.treefmt
Project-level treefmt configuration
Use config.treefmt.build.wrapper
to get access to the
resulting treefmt package based on this configuration.
By default treefmt-nix will set the
formatter.<system>
attribute of the flake, used by
the nix fmt
command.
Type: submodule
Declared by:
perSystem.treefmt.package
The treefmt package to use.
Type: package
Default: pkgs.treefmt
Declared by:
treefmt-nix/module-options.nix
perSystem.treefmt.build.check
Create a flake check to test that the given project tree is already formatted.
Input argument is the path to the project tree (usually ‘self’).
Type: function that evaluates to a(n) package
Default: Default check implementation
Declared by:
treefmt-nix/module-options.nix
perSystem.treefmt.build.configFile
Contains the generated config file derived from the settings.
Type: path
Declared by:
treefmt-nix/module-options.nix
perSystem.treefmt.build.programs
Attrset of formatter programs enabled in treefmt configuration.
The key of the attrset is the formatter name, with the value being the package used to do the formatting.
Type: attribute set of package
Default: Programs used in configuration
Declared by:
treefmt-nix/module-options.nix
perSystem.treefmt.build.wrapper
The treefmt package, wrapped with the config file.
Type: package
Default: wrapped treefmt
command
Declared by:
treefmt-nix/module-options.nix
perSystem.treefmt.flakeCheck
Add a flake check to run treefmt
Type: boolean
Default: true
Declared by:
perSystem.treefmt.flakeFormatter
Enables treefmt
the default formatter used by the
nix fmt
command
Type: boolean
Default: true
Declared by:
perSystem.treefmt.programs.alejandra.enable
Whether to enable alejandra.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/alejandra.nix
perSystem.treefmt.programs.alejandra.package
The alejandra package to use.
Type: package
Default: pkgs.alejandra
Declared by:
treefmt-nix/programs/alejandra.nix
perSystem.treefmt.programs.beautysh.enable
Whether to enable beautysh.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/beautysh.nix
perSystem.treefmt.programs.beautysh.package
The beautysh package to use.
Type: package
Default: pkgs.beautysh
Declared by:
treefmt-nix/programs/beautysh.nix
perSystem.treefmt.programs.beautysh.indent_size
Sets the number of spaces to be used in indentation.
Type: signed integer
Default: 2
Example: 4
Declared by:
treefmt-nix/programs/beautysh.nix
perSystem.treefmt.programs.black.enable
Whether to enable black.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/black.nix
perSystem.treefmt.programs.black.package
The black package to use.
Type: package
Default: pkgs.black
Declared by:
treefmt-nix/programs/black.nix
perSystem.treefmt.programs.buildifier.enable
Whether to enable buildifier.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/buildifier.nix
perSystem.treefmt.programs.buildifier.package
The buildifier package to use.
Type: package
Default: pkgs.buildifier
Declared by:
treefmt-nix/programs/buildifier.nix
perSystem.treefmt.programs.cabal-fmt.enable
Whether to enable cabal-fmt.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/cabal-fmt.nix
perSystem.treefmt.programs.cabal-fmt.package
cabal-fmt derivation to use.
Type: package
Default: pkgs.haskellPackages.cabal-fmt
Declared by:
treefmt-nix/programs/cabal-fmt.nix
perSystem.treefmt.programs.clang-format.enable
Whether to enable clang-format.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/clang-format.nix
perSystem.treefmt.programs.clang-format.package
The clang-tools package to use.
Type: package
Default: pkgs.clang-tools
Declared by:
treefmt-nix/programs/clang-format.nix
perSystem.treefmt.programs.deadnix.enable
Whether to enable deadnix.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/deadnix.nix
perSystem.treefmt.programs.deadnix.package
The deadnix package to use.
Type: package
Default: pkgs.deadnix
Declared by:
treefmt-nix/programs/deadnix.nix
perSystem.treefmt.programs.deadnix.no-lambda-arg
Whether to enable Don’t check lambda parameter arguments.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/deadnix.nix
perSystem.treefmt.programs.deadnix.no-lambda-pattern-names
Whether to enable Don’t check lambda attrset pattern names (don’t break nixpkgs callPackage).
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/deadnix.nix
perSystem.treefmt.programs.deadnix.no-underscore
Whether to enable Don’t check any bindings that start with a _.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/deadnix.nix
perSystem.treefmt.programs.dhall.enable
Whether to enable dhall.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/dhall.nix
perSystem.treefmt.programs.dhall.package
dhall derivation to use.
Type: package
Default: pkgs.dhall
Declared by:
treefmt-nix/programs/dhall.nix
perSystem.treefmt.programs.dprint.enable
Whether to enable dprint.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/dprint.nix
perSystem.treefmt.programs.dprint.package
The dprint package to use.
Type: package
Default: pkgs.dprint
Declared by:
treefmt-nix/programs/dprint.nix
perSystem.treefmt.programs.dprint.config.excludes
Array of patterns (globs) to exclude files or directories to format.
Type: null or (list of Concatenated string)
Default: null
Example:
[
"**/node_modules"
"**/*-lock.json"
]
Declared by:
treefmt-nix/programs/dprint.nix
perSystem.treefmt.programs.dprint.config.extends
Configurations to extend.
Type: null or string or list of string
Default: null
Example:
"https://dprint.dev/path/to/config/file.v1.json"
Declared by:
treefmt-nix/programs/dprint.nix
perSystem.treefmt.programs.dprint.config.includes
Array of patterns (globs) to use to find files to format.
Type: null or (list of string)
Default:
[
".*"
]
Example:
[
"**/*.{ts,tsx,js,jsx,mjs,json,md}"
]
Declared by:
treefmt-nix/programs/dprint.nix
perSystem.treefmt.programs.dprint.config.incremental
Whether to format files only when they change.
Type: null or boolean
Default: null
Example: true
Declared by:
treefmt-nix/programs/dprint.nix
perSystem.treefmt.programs.dprint.config.indentWidth
The number of characters for an indent
Type: null or signed integer
Default: null
Example: 2
Declared by:
treefmt-nix/programs/dprint.nix
perSystem.treefmt.programs.dprint.config.lineWidth
The width of a line the printer will try to stay under. Note that the printer may exceed this width in certain cases.
Type: null or signed integer
Default: null
Example: 80
Declared by:
treefmt-nix/programs/dprint.nix
perSystem.treefmt.programs.dprint.config.newLineKind
The kind of newline to use (one of: auto, crlf, lf, system).
Type: null or string
Default: null
Example: "auto"
Declared by:
treefmt-nix/programs/dprint.nix
perSystem.treefmt.programs.dprint.config.plugins
Array of plugin URLs to format files.
Type: null or (list of string)
Default: null
Example:
[
"https://plugins.dprint.dev/json-0.17.2.wasm"
"https://plugins.dprint.dev/markdown-0.15.2.wasm"
"https://plugins.dprint.dev/typescript-0.84.4.wasm"
]
Declared by:
treefmt-nix/programs/dprint.nix
perSystem.treefmt.programs.dprint.config.useTabs
Whether to use tabs (true) or spaces (false) for indentation.
Type: null or boolean
Default: null
Example: true
Declared by:
treefmt-nix/programs/dprint.nix
perSystem.treefmt.programs.dprint.wrapper
The dprint package, wrapped with the config file.
Type: package
Default: wrapped dprint
command
Declared by:
treefmt-nix/programs/dprint.nix
perSystem.treefmt.programs.elm-format.enable
Whether to enable elm-format.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/elm-format.nix
perSystem.treefmt.programs.elm-format.package
elm-format derivation to use.
Type: package
Default: pkgs.elmPackages.elm-format
Declared by:
treefmt-nix/programs/elm-format.nix
perSystem.treefmt.programs.erlfmt.enable
Whether to enable erlfmt.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/erlfmt.nix
perSystem.treefmt.programs.erlfmt.package
The erlfmt package to use.
Type: package
Default: pkgs.erlfmt
Declared by:
treefmt-nix/programs/erlfmt.nix
perSystem.treefmt.programs.erlfmt.print-width
The line length that formatter would wrap on
Type: signed integer
Default: 100
Example: 80
Declared by:
treefmt-nix/programs/erlfmt.nix
perSystem.treefmt.programs.gofmt.enable
Whether to enable gofmt.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/gofmt.nix
perSystem.treefmt.programs.gofmt.package
The go package to use.
Type: package
Default: pkgs.go
Declared by:
treefmt-nix/programs/gofmt.nix
perSystem.treefmt.programs.gofumpt.enable
Whether to enable gofumpt.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/gofumpt.nix
perSystem.treefmt.programs.gofumpt.package
The gofumpt package to use.
Type: package
Default: pkgs.gofumpt
Declared by:
treefmt-nix/programs/gofumpt.nix
perSystem.treefmt.programs.gofumpt.extra
Whether to enable extra rules.
Type: boolean
Default: false
Declared by:
treefmt-nix/programs/gofumpt.nix
perSystem.treefmt.programs.google-java-format.enable
Whether to enable google-java-format.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/google-java-format.nix
perSystem.treefmt.programs.google-java-format.package
The google-java-format package to use.
Type: package
Default: pkgs.google-java-format
Declared by:
treefmt-nix/programs/google-java-format.nix
perSystem.treefmt.programs.hclfmt.enable
Whether to enable hclfmt.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/hclfmt.nix
perSystem.treefmt.programs.hclfmt.package
The hclfmt package to use.
Type: package
Default: pkgs.hclfmt
Declared by:
treefmt-nix/programs/hclfmt.nix
perSystem.treefmt.programs.hlint.enable
Whether to enable hlint.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/hlint.nix
perSystem.treefmt.programs.hlint.package
The hlint package to use.
Type: package
Default: pkgs.hlint
Declared by:
treefmt-nix/programs/hlint.nix
perSystem.treefmt.programs.mdsh.enable
Whether to enable mdsh.
Type: boolean
Default: false
Example: true
Declared by:
perSystem.treefmt.programs.mdsh.package
The mdsh package to use.
Type: package
Default: pkgs.mdsh
Declared by:
perSystem.treefmt.programs.nixfmt.enable
Whether to enable nixfmt.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/nixfmt.nix
perSystem.treefmt.programs.nixfmt.package
The nixfmt package to use.
Type: package
Default: pkgs.nixfmt
Declared by:
treefmt-nix/programs/nixfmt.nix
perSystem.treefmt.programs.nixpkgs-fmt.enable
Whether to enable nixpkgs-fmt.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/nixpkgs-fmt.nix
perSystem.treefmt.programs.nixpkgs-fmt.package
The nixpkgs-fmt package to use.
Type: package
Default: pkgs.nixpkgs-fmt
Declared by:
treefmt-nix/programs/nixpkgs-fmt.nix
perSystem.treefmt.programs.ocamlformat.enable
Whether to enable ocamlformat.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/ocamlformat.nix
perSystem.treefmt.programs.ocamlformat.package
The ocamlformat package to use.
Type: package
Default: pkgs.ocamlformat
Declared by:
treefmt-nix/programs/ocamlformat.nix
perSystem.treefmt.programs.ocamlformat.configFile
Path to the .ocamlformat file. Used to pick the right version of ocamlformat if passed.
Type: null or path
Default: null
Declared by:
treefmt-nix/programs/ocamlformat.nix
perSystem.treefmt.programs.ocamlformat.pkgs
The package set used to get the ocamlformat package at a specific version.
Type: lazy attribute set of raw value
Default: Nixpkgs from context
Declared by:
treefmt-nix/programs/ocamlformat.nix
perSystem.treefmt.programs.ormolu.enable
Whether to enable ormolu.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/ormolu.nix
perSystem.treefmt.programs.ormolu.package
The ormolu package to use.
Type: package
Default: pkgs.ormolu
Declared by:
treefmt-nix/programs/ormolu.nix
perSystem.treefmt.programs.ormolu.ghcOpts
Which GHC language extensions to enable
Type: unspecified value
Default:
[
"BangPatterns"
"PatternSynonyms"
"TypeApplications"
]
Declared by:
treefmt-nix/programs/ormolu.nix
perSystem.treefmt.programs.prettier.enable
Whether to enable prettier.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/prettier.nix
perSystem.treefmt.programs.prettier.package
prettier derivation to use.
Type: package
Default: pkgs.nodePackages.prettier
Declared by:
treefmt-nix/programs/prettier.nix
perSystem.treefmt.programs.purs-tidy.enable
Whether to enable purs-tidy.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/purs-tidy.nix
perSystem.treefmt.programs.purs-tidy.package
purs-tidy derivation to use.
Type: package
Default: pkgs.nodePackages.purs-tidy
Declared by:
treefmt-nix/programs/purs-tidy.nix
perSystem.treefmt.programs.ruff.enable
Whether to enable ruff.
Type: boolean
Default: false
Example: true
Declared by:
perSystem.treefmt.programs.ruff.package
The ruff package to use.
Type: package
Default: pkgs.ruff
Declared by:
perSystem.treefmt.programs.rufo.enable
Whether to enable rufo.
Type: boolean
Default: false
Example: true
Declared by:
perSystem.treefmt.programs.rufo.package
The rufo package to use.
Type: package
Default: pkgs.rufo
Declared by:
perSystem.treefmt.programs.rustfmt.enable
Whether to enable rustfmt.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/rustfmt.nix
perSystem.treefmt.programs.rustfmt.package
The rustfmt package to use.
Type: package
Default: pkgs.rustfmt
Declared by:
treefmt-nix/programs/rustfmt.nix
perSystem.treefmt.programs.rustfmt.edition
Rust edition to target when formatting
Type: string
Default: "2021"
Declared by:
treefmt-nix/programs/rustfmt.nix
perSystem.treefmt.programs.scalafmt.enable
Whether to enable scalafmt.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/scalafmt.nix
perSystem.treefmt.programs.scalafmt.package
The scalafmt package to use.
Type: package
Default: pkgs.scalafmt
Declared by:
treefmt-nix/programs/scalafmt.nix
perSystem.treefmt.programs.shellcheck.enable
Whether to enable shellcheck.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/shellcheck.nix
perSystem.treefmt.programs.shellcheck.package
The shellcheck package to use.
Type: package
Default: pkgs.shellcheck
Declared by:
treefmt-nix/programs/shellcheck.nix
perSystem.treefmt.programs.shfmt.enable
Whether to enable shfmt.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/shfmt.nix
perSystem.treefmt.programs.shfmt.package
The shfmt package to use.
Type: package
Default: pkgs.shfmt
Declared by:
treefmt-nix/programs/shfmt.nix
perSystem.treefmt.programs.shfmt.indent_size
Sets the number of spaces to be used in indentation. Uses tabs if set to zero.
Type: signed integer
Default: 2
Example: 4
Declared by:
treefmt-nix/programs/shfmt.nix
perSystem.treefmt.programs.stylish-haskell.enable
Whether to enable stylish-haskell.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/stylish-haskell.nix
perSystem.treefmt.programs.stylish-haskell.package
The stylish-haskell package to use.
Type: package
Default: pkgs.stylish-haskell
Declared by:
treefmt-nix/programs/stylish-haskell.nix
perSystem.treefmt.programs.stylua.enable
Whether to enable stylua.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/stylua.nix
perSystem.treefmt.programs.stylua.package
The stylua package to use.
Type: package
Default: pkgs.stylua
Declared by:
treefmt-nix/programs/stylua.nix
perSystem.treefmt.programs.taplo.enable
Whether to enable taplo.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/taplo.nix
perSystem.treefmt.programs.taplo.package
The taplo package to use.
Type: package
Default: pkgs.taplo
Declared by:
treefmt-nix/programs/taplo.nix
perSystem.treefmt.programs.terraform.enable
Whether to enable terraform.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/terraform.nix
perSystem.treefmt.programs.terraform.package
The terraform package to use.
Type: package
Default: pkgs.terraform
Declared by:
treefmt-nix/programs/terraform.nix
perSystem.treefmt.programs.yamlfmt.enable
Whether to enable yamlfmt.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/yamlfmt.nix
perSystem.treefmt.programs.yamlfmt.package
The yamlfmt package to use.
Type: package
Default: pkgs.yamlfmt
Declared by:
treefmt-nix/programs/yamlfmt.nix
perSystem.treefmt.programs.zprint.enable
Whether to enable zprint.
Type: boolean
Default: false
Example: true
Declared by:
treefmt-nix/programs/zprint.nix
perSystem.treefmt.programs.zprint.package
zprint derivation to use.
Type: package
Default: pkgs.zprint
Declared by:
treefmt-nix/programs/zprint.nix
perSystem.treefmt.programs.zprint.zprintOpts
Clojure map containing zprint options.
Type: null or string
Default: null
Example: "{:width 90}"
Declared by:
treefmt-nix/programs/zprint.nix
perSystem.treefmt.projectRootFile
File to look for to determine the root of the project in the build.wrapper.
Type: unspecified value
Example: "flake.nix"
Declared by:
treefmt-nix/module-options.nix
perSystem.treefmt.settings.formatter
Set of formatters to use
Type: attribute set of (submodule)
Default: { }
Declared by:
treefmt-nix/module-options.nix
perSystem.treefmt.settings.formatter.<name>.command
Executable obeying the treefmt formatter spec
Type: Path to executable
Declared by:
treefmt-nix/module-options.nix
perSystem.treefmt.settings.formatter.<name>.excludes
List of files to exclude for formatting. Supports globbing. Takes precedence over the includes.
Type: list of string
Default: [ ]
Declared by:
treefmt-nix/module-options.nix
perSystem.treefmt.settings.formatter.<name>.includes
List of files to include for formatting. Supports globbing.
Type: list of string
Declared by:
treefmt-nix/module-options.nix
perSystem.treefmt.settings.formatter.<name>.options
List of arguments to pass to the command
Type: list of string
Default: [ ]
Declared by:
treefmt-nix/module-options.nix
perSystem.treefmt.settings.global.excludes
A global list of paths to exclude. Supports glob.
Type: list of string
Default: [ ]
Example:
[
"./node_modules/**"
]
Declared by: