mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-05 18:01:32 +00:00
languages/nix: make nix fmt work outside the lsp
Add a writeShellApplication wrapper to allow the flake formatter to stand on it's own.
This commit is contained in:
parent
0e5db64202
commit
f48e872f93
1 changed files with 6 additions and 2 deletions
|
@ -24,7 +24,7 @@
|
|||
command = ["${cfg.format.package}/bin/nixfmt"];
|
||||
})
|
||||
(mkIf (cfg.format.type == "flake") {
|
||||
command = ["${cfg.format.package}/bin/nix" "fmt"];
|
||||
command = ["${cfg.format.package}/bin/nix_fmt"];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
@ -63,7 +63,11 @@
|
|||
};
|
||||
|
||||
flake = {
|
||||
package = pkgs.nix;
|
||||
package = pkgs.writeShellApplication {
|
||||
name = "nix_fmt";
|
||||
runtimeInputs = [pkgs.nix];
|
||||
text = "nix fmt";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue