mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-30 23:55:15 +02:00
flake-modules: add treefmt to fix the 'nix fmt' command
This commit is contained in:
parent
ba545ded79
commit
f7f255afe2
4 changed files with 58 additions and 3 deletions
|
@ -2,13 +2,24 @@
|
|||
{
|
||||
imports = [
|
||||
inputs.pre-commit-hooks.flakeModule
|
||||
inputs.treefmt-nix.flakeModule
|
||||
./devshell.nix
|
||||
];
|
||||
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
formatter = config.treefmt.build.wrapper;
|
||||
|
||||
treefmt.config = {
|
||||
inherit (config.flake-root) projectRootFile;
|
||||
package = pkgs.treefmt;
|
||||
|
||||
programs = {
|
||||
nixfmt-rfc-style.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
pre-commit = {
|
||||
settings.hooks = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue