different codebases use different formatters. autofmt looks for project configuration to pick the correct formatter, allowing an editor to simply point to the script and have all ambiguities resolved. this commit overhauls the conform configuration to set up autofmt correctly, as well installing it with 'pkgs.autofmt' closes #6
14 lines
291 B
Nix
14 lines
291 B
Nix
{ pkgs, ... }:
|
|
pkgs.writeShellApplication {
|
|
name = "autofmt";
|
|
runtimeInputs = with pkgs; [
|
|
# include only a couple of formatters by default
|
|
deno
|
|
nixfmt-rfc-style
|
|
dprint
|
|
rustfmt
|
|
zig
|
|
clang-tools
|
|
];
|
|
text = ''exec deno run -A ${../files/autofmt.js} "$@"'';
|
|
}
|