This repository has been archived by the owner on Dec 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Nixify treefmt.toml
#1
Comments
This is now possible using treefmt.buildInputs = [
(inputs'.treefmt.legacyPackages.default.withConfig {
projectRootFile = "flake.nix";
settings = {
formatter = {
nix = {
command = lib.getExe pkgs.nixpkgs-fmt;
includes = [ "*.nix" ];
};
purescript = {
command = lib.getExe pkgs.nodePackages.purs-tidy;
options = [ "format-in-place" ];
# Note that given how purs-tidy is designed (takes glob, rather than explicit
# list of files), these patters inevitably slow down purs-tidy (thus treefmt)
# during the initial run.
includes = [
"src/**/*.purs"
"core/**/*.purs"
"lib/**/*.purs"
"src/**/*.purs"
"domain/**/*.purs"
"infrastructure/**/*.purs"
"ui-guide/**/*.purs"
"test/**/*.purs"
];
};
};
};
})
]; May as well retire this repo right away by moving it to upstream repo after numtide/treefmt#169 gets merged to |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We want to nixify
treefmt.toml
, and have it directly use the nix packages, in addition to havingtreefmt
in nix shell run with the nixified configuration.We can use numtide/treefmt#169 but the main blocker is the lack of
PRJ_ROOT
(see comments).The text was updated successfully, but these errors were encountered: