mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-09 16:54:36 +02:00
Remove explicit `formatter = config.treefmt.build.wrapper`, because treefmt's `flakeFormatter` option (default `true`) handles that for us.
36 lines
745 B
Nix
36 lines
745 B
Nix
{ inputs, ... }:
|
|
{
|
|
imports = [
|
|
inputs.git-hooks.flakeModule
|
|
inputs.treefmt-nix.flakeModule
|
|
./devshell.nix
|
|
];
|
|
|
|
perSystem =
|
|
{ pkgs, config, ... }:
|
|
{
|
|
treefmt.config = {
|
|
projectRootFile = "flake.nix";
|
|
package = pkgs.treefmt;
|
|
|
|
programs = {
|
|
nixfmt-rfc-style.enable = true;
|
|
statix.enable = true;
|
|
};
|
|
};
|
|
|
|
pre-commit = {
|
|
settings.hooks = {
|
|
nixfmt = {
|
|
package = pkgs.nixfmt-rfc-style;
|
|
enable = true;
|
|
};
|
|
statix = {
|
|
enable = true;
|
|
excludes = [ "plugins/lsp/language-servers/rust-analyzer-config.nix" ];
|
|
};
|
|
typos.enable = true;
|
|
};
|
|
};
|
|
};
|
|
}
|