numtide / treefmt-nix

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

just: add as formatter #141

Closed katexochen closed 7 months ago

katexochen commented 8 months ago

Adding just formatting.

I'm new to treefmt, but as far as I understand it requires formatters to be able to take files to format as arguments, which just currently doesn't support. I've opened https://github.com/casey/just/issues/1760 as feature request. Opening this PR as draft while looking for a solution...

I've also updated the README section about adding a new formatter, some commands were outdated.

katexochen commented 7 months ago

I've added a wrapper around just to handle multiple files, similar to what is described in https://github.com/numtide/treefmt/wiki#shell

zimbatm commented 7 months ago

cheers. I had to remove the just example because it contains platform-specific paths. Everything is pushed to the main branch now.