-
Notifications
You must be signed in to change notification settings - Fork 202
feat: nixfmt indent #627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat: nixfmt indent #627
Conversation
|
nixpkgs 25.11 is going to ship If we want to ship this option, it needs to be added to Don't worry to much about making it pretty or trying to dedupe the code. This will be taken care of in the module transition. |
because otherwise there is no way to enable it, as i understand, and adding options to it is pointless
- use original description from the cli - use 'with types' for readability
add new options for the nixfmt hook as well
also check version for indent in nixfmt and nixfmt-rfc-style hooks
|
sorry for the late reply.
for both also, i am not very sure about this, but i removed the |
nixfmt 1.0.0 added an
--indent=INToption to configure indentation width. this PR adds this option tonixfmt-rfc-stylesettings to avoid usingargs = [ "--indent=X" ].aside from that, i didn't like how options were handled previously, so i refactored it a bit. if this is too much (because the solution is a bit hacky and it's still not DRY), only the first commit with the feature itself without any refactoring is available - i can do a force push to it.
also, the indent option description should probably be
"Indentation width.". noticed that only while writing the PR description.