-
Notifications
You must be signed in to change notification settings - Fork 141
Description
Is your feature request related to a problem? Please describe.
I'm using treefmt-nix for Clojure projects, but cljstyle (a Clojure code formatter) is not supported as a built-in program. Currently, I need to manually configure it as a custom formatter.
Describe the solution you'd like
Add cljstyle as a built-in program in treefmt-nix. It should work similarly to other formatters (black, rustfmt, etc.) with a simple configuration like:
{
programs.cljstyle.enable = true;
}Describe alternatives you've considered
Currently using settings.formatter to configure it as a custom formatter, but this requires manual package management and command-line option configuration:
{
settings.formatter.cljstyle = {
command = "${pkgs.cljstyle}/bin/cljstyle";
options = ["fix"];
includes = ["*.clj" "*.cljs" "*.cljc" "*.edn"];
};
}Additional context
cljstyle is a widely used formatter in the Clojure community. It would be helpful to have support for its configuration file (.cljstyle) and common options (check, fix, pipe).
References:
cljstyle: https://github.com/greglook/cljstyle
nixpkgs.cljstyle: https://search.nixos.org/packages?query=cljstyle