forked from extern/flakelight
592cb247bf
The fact it uses bash is an implementation detail. Update the documentation to state that the input is a file name glob rather than a bash case match. Updates the default formatters to not rely on being a bash case statement.
27 lines
586 B
Nix
27 lines
586 B
Nix
# flakelight -- Framework for simplifying flake setup
|
|
# Copyright (C) 2023 Archit Gupta <archit@accelbread.com>
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
{ lib, ... }:
|
|
let
|
|
inherit (lib) mkEnableOption;
|
|
in
|
|
{
|
|
options.flakelight.builtinFormatters =
|
|
mkEnableOption "default formatters" // { default = true; };
|
|
|
|
config = {
|
|
devShell.packages = pkgs: [
|
|
pkgs.nixpkgs-fmt
|
|
pkgs.nodePackages.prettier
|
|
];
|
|
|
|
formatters = {
|
|
"*.nix" = "nixpkgs-fmt";
|
|
"*.md" = "prettier --write";
|
|
"*.json" = "prettier --write";
|
|
"*.yml" = "prettier --write";
|
|
};
|
|
};
|
|
}
|