17 lines
360 B
Nix
17 lines
360 B
Nix
{ pkgs, treefmt-nix }:
|
|
treefmt-nix.lib.evalModule pkgs {
|
|
projectRootFile = "flake.nix";
|
|
|
|
# Configure individual formatters
|
|
programs = {
|
|
# Nix formatter
|
|
nixpkgs-fmt.enable = true;
|
|
|
|
# C++ formatter
|
|
clang-format.enable = true;
|
|
};
|
|
|
|
# Optional settings
|
|
settings.formatter.clang-format.includes = [ "*.cpp" "*.h" "*.hpp" "*.c" ];
|
|
}
|