treefmt-nix icon indicating copy to clipboard operation
treefmt-nix copied to clipboard

global ignore/exclude

Open quinn-dougherty opened this issue 1 year ago • 1 comments

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

I'm working with git submodules, and they currently feel incompatible with treefmt-nix.

Describe the solution you'd like

treefmt.config.settings.exclude = [ "dir1" "dir2" ]

Describe alternatives you've considered

settings.formatter = {
        prettier.excludes = [ "submoduleA/" ];
        black.excludes = [ "submoduleA/" ];
      };

this did not work.

quinn-dougherty avatar Mar 23 '24 22:03 quinn-dougherty

try treefmt.config.settings.global.excludes = [ "dir1" "dir2" ]

zimbatm avatar Mar 24 '24 11:03 zimbatm

assuming it's fixed

zimbatm avatar May 30 '24 14:05 zimbatm

Works for me but for anyone else searching: folder/** is the required format (at least for me excluding a submodule recursive) - also the option appears to be called excludes not exclude and for me it does not throw an error just ignores the (invalid?) option ✌🏻

SebTM avatar Jun 01 '24 00:06 SebTM