numtide / treefmt-nix

treefmt nix configuration
https://numtide.github.io/treefmt/
MIT License
270 stars 83 forks source link

Expose each formatter as TOML config #34

Closed zimbatm closed 1 year ago

zimbatm commented 1 year ago

Is your feature request related to a problem? Please describe.

The formatter snippets are currently only available to Nix users. It should be possible to re-export the data to TOML, so it's also valuable for the other users.

Describe the solution you'd like

Some Nix script that loads and enables each formatter module, captures the generated configuration TOML and then stores it somewhere. It should also clean the formatter command, so it doesn't point to the /nix/store entry. Just the basename is enough.

I'm not sure exactly where the generated TOML should end up in.

Describe alternatives you've considered

Additional context

huwaireb commented 1 year ago

Perhaps a simple flake app that is run generating a treefmt.toml in the project root?