prettierd is a daemon for prettier, allowing lower latency formats see https://github.com/fsouza/prettierd
15 lines
359 B
Nix
15 lines
359 B
Nix
{ pkgs, ... }:
|
|
pkgs.writeShellApplication {
|
|
name = "autofmt";
|
|
runtimeInputs = with pkgs; [
|
|
# include only a couple of formatters by default
|
|
clang-tools
|
|
deno
|
|
dprint
|
|
nixfmt-rfc-style
|
|
prettierd # autofmt only runs on a local build of prettier
|
|
rustfmt
|
|
zig
|
|
];
|
|
text = ''exec ${pkgs.nodejs}/bin/node ${./autofmt.js} "$@"'';
|
|
}
|