nixfmt icon indicating copy to clipboard operation
nixfmt copied to clipboard

Configurable indentation size

Open RealityAnomaly opened this issue 3 years ago • 5 comments

I prefer to indent my Nix expressions with four spaces rather than two as I find it more readable. It'd be nice to have this as a command-line option you can specify, with two as the default.

RealityAnomaly avatar Mar 10 '21 16:03 RealityAnomaly

yes and a tabs option please preferably even respecting the settings in .editorconfig

quantenzitrone avatar Jun 08 '23 10:06 quantenzitrone

While it has been configurable for a while using -w, since #118, it's a soft limit, and not a hard one. We should also implement a way to configure the hard limit now.

infinisil avatar Apr 02 '24 18:04 infinisil

-w is for line length not indentation

quantenzitrone avatar Apr 03 '24 20:04 quantenzitrone

Yep sorry, that was an oversight on my side :/

dasJ avatar Apr 03 '24 20:04 dasJ

Ah I see, makes sense!

I guess for that we should use editorconfig's indent_size

infinisil avatar Apr 04 '24 00:04 infinisil