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`. Defaults to `false`.
### prettier.proseWrap
Allows changing the proseWrap setting to one of the known values: `preserve`,
`always`, `never`.
Defaults to `preserve`.
### rust.enable ### rust.enable
If set to true, then `rustfmt.toml` will be created. If set to true, then `rustfmt.toml` will be created.

View file

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

View file

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

View file

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