feat: added prettier.proseWrap setting and added conform to packages

This commit is contained in:
D. Moonfire 2024-01-29 14:31:10 -06:00
parent 536a7f6256
commit b9aa1ade88
4 changed files with 19 additions and 3 deletions

View file

@ -110,6 +110,13 @@ https://developercertificate.org/.
Defaults to `false`.
### prettier.proseWrap
Allows changing the proseWrap setting to one of the known values: `preserve`,
`always`, `never`.
Defaults to `preserve`.
### rust.enable
If set to true, then `rustfmt.toml` will be created.

View file

@ -30,6 +30,7 @@
, conform ? { }
, contributorCovenant ? { }
, developerCertificateOfOrigin ? { }
, prettier ? { }
, rust ? { }
, ...
}:
@ -37,6 +38,7 @@
conformDefaults = { scopes = [ ]; };
contributorCovenantDefaults = { enable = false; };
developerCertificateOfOriginDefaults = { enable = false; };
prettierDefaults = { proseWrap = "preserve"; };
rustDefaults = { enable = false; };
text-engine = import ./src/engines/text.nix {
@ -52,11 +54,16 @@
contributorCovenant = contributorCovenantDefaults // contributorCovenant;
developerCertificateOfOrigin = developerCertificateOfOriginDefaults // developerCertificateOfOrigin;
conform = conformDefaults // conform;
prettier = prettierDefaults // prettier;
rust = rustDefaults // rust;
};
in
{
packages = [ pkgs.lefthook pkgs.treefmt ];
packages = [
pkgs.lefthook
pkgs.treefmt
pkgs.conform
];
shellHook = ''
${configs.shellHook}
@ -73,6 +80,7 @@
contributorCovenant.enable = true;
contributorCovenant.contact = "contact@mfgames.com";
developerCertificateOfOrigin.enable = true;
prettier.proseWrap = "always";
};
in
{

View file

@ -1,6 +1,7 @@
inputs @ { pkgs
, contributorCovenant
, developerCertificateOfOrigin
, prettier
, rust
, ...
}:

View file

@ -1,7 +1,7 @@
inputs @ { system, nixago, nixago-exts, ... }:
inputs @ { system, nixago, nixago-exts, prettier, ... }:
nixago-exts.prettier.${system} {
data = {
printWidth = 80;
proseWrap = "always";
proseWrap = prettier.proseWrap;
};
}