mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-02-28 06:23:08 -08:00
feat: add treefmt.nix setup
Add a treefmt setup for a single-entry point format-everything system. To use it, simply run `nix fmt`. This will in term run nixfmt, prettier and rustfmt. Signed-off-by: wucke13 <wucke13+github@gmail.com>
This commit is contained in:
30
treefmt.nix
Normal file
30
treefmt.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Used to find the project root
|
||||
projectRootFile = "flake.nix";
|
||||
programs.nixfmt.enable = true;
|
||||
programs.prettier = {
|
||||
enable = true;
|
||||
includes = [
|
||||
"*.css"
|
||||
"*.html"
|
||||
"*.js"
|
||||
"*.json"
|
||||
"*.json5"
|
||||
"*.md"
|
||||
"*.mdx"
|
||||
"*.toml"
|
||||
"*.yaml"
|
||||
"*.yml"
|
||||
];
|
||||
excludes = [
|
||||
"supply-chain/*"
|
||||
];
|
||||
settings = {
|
||||
plugins = [
|
||||
"${pkgs.nodePackages.prettier-plugin-toml}/lib/node_modules/prettier-plugin-toml/lib/index.js"
|
||||
];
|
||||
};
|
||||
};
|
||||
programs.rustfmt.enable = true;
|
||||
}
|
||||
Reference in New Issue
Block a user