Merge pull request #88 from NotAShelf/prettier-daemon

prettier daemon
This commit is contained in:
NotAShelf 2023-07-11 23:13:22 +03:00 committed by GitHub
commit 5e0a9b1d07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -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

View file

@ -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