mirror of
https://github.com/RGBCube/alejandra
synced 2025-07-31 04:27:45 +00:00
chore: add treefmt - to format them all
- this is a unified & modern approch to keeping all files according to fmt-spec - has excellent editor integration
This commit is contained in:
parent
b72274b052
commit
0f227ee76a
3 changed files with 77 additions and 1 deletions
|
@ -5,6 +5,8 @@
|
|||
flakeCompat.url = github:edolstra/flake-compat;
|
||||
flakeCompat.flake = false;
|
||||
flakeUtils.url = "github:numtide/flake-utils";
|
||||
treefmt.url = "github:numtide/treefmt";
|
||||
treefmt.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
};
|
||||
outputs =
|
||||
|
@ -15,6 +17,7 @@
|
|||
let
|
||||
nixpkgs = import inputs.nixpkgs { inherit system; };
|
||||
cargoToml = builtins.fromTOML ( builtins.readFile ./Cargo.toml );
|
||||
treefmt = inputs.treefmt.defaultPackage.${ system };
|
||||
fenix = inputs.fenix.packages.${ system };
|
||||
fenixPlatform = nixpkgs.makeRustPlatform { inherit ( fenix.latest ) cargo rustc; };
|
||||
in
|
||||
|
@ -53,7 +56,11 @@
|
|||
fenix.latest.rust-src
|
||||
fenix.latest.rustc
|
||||
fenix.latest.rustfmt
|
||||
treefmt
|
||||
nixpkgs.shfmt
|
||||
nixpkgs.nodePackages.prettier
|
||||
];
|
||||
shellHook = "cargo build";
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue