Skip to content

Commit

Permalink
treefmt: replace prettier with deno
Browse files Browse the repository at this point in the history
we don't have toml files and deno has a smaller install closure.
  • Loading branch information
Mic92 committed Dec 9, 2023
1 parent ab989d7 commit b58e8c9
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions dev/treefmt.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{ pkgs, lib, ... }: {
{ pkgs, ... }: {
# Used to find the project root
projectRootFile = "flake.lock";

programs.prettier.enable = true;
programs.prettier.package = pkgs.writeShellScriptBin "prettier" ''
export NODE_PATH=${pkgs.nodePackages.prettier-plugin-toml}/lib/node_modules
exec ${pkgs.nodePackages.prettier}/bin/prettier "$@"
'';
programs.deno.enable = true;

programs.clang-format.enable = true;

Expand All @@ -32,8 +28,6 @@

clang-format = { };

prettier.includes = lib.mkForce [ "*.toml" ];

python = {
command = "sh";
options = [
Expand Down

0 comments on commit b58e8c9

Please sign in to comment.