diff --git a/docs/release-notes/rl-0.4.adoc b/docs/release-notes/rl-0.4.adoc index 389a19c..16f629c 100644 --- a/docs/release-notes/rl-0.4.adoc +++ b/docs/release-notes/rl-0.4.adoc @@ -65,5 +65,7 @@ https://github.com/notashelf[notashelf]: * Added a module for enabling Neovim's spellchecker +* Replaced prettier with prettierd - the daemonized version of prettier + * Cleaned up documentation diff --git a/modules/languages/ts.nix b/modules/languages/ts.nix index 3989b47..44fc765 100644 --- a/modules/languages/ts.nix +++ b/modules/languages/ts.nix @@ -23,7 +23,7 @@ with builtins; let }; # TODO: specify packages - defaultFormat = "prettier"; + defaultFormat = "prettierd"; formats = { prettier = { package = pkgs.nodePackages.prettier; @@ -36,6 +36,17 @@ with builtins; let ) ''; }; + prettierd = { + package = pkgs.prettierd; + nullConfig = '' + table.insert( + ls_sources, + null_ls.builtins.formatting.prettier.with({ + command = "${cfg.format.package}/bin/prettierd", + }) + ) + ''; + }; }; # TODO: specify packages