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
better nix-indent-line
#42
Conversation
Awesome! Can you leave |
@matthewbauer rebased it out |
Thanks! |
How do I opt in? |
|
Very nice, works wonderfully! (Although I'm not sure what this PR changed exactly, since I've used the default indenting method til now) |
Yeah I think it will take a while to hit MELPA if you're using that. Previously it worked well for simple attribute sets but was really annoying for things like |
Ah then it's probably from this PR, the let in indentation works really well now. I'm using an override to get the latest version: infinisil/system@69850ad#diff-ead122d1171f94751babb654c3083b18R37 |
Two rules for indentation:
}
,]
,)
orin
get indented to the same level as their matching token.=
, or 2, unless they start withlet
,with
,[
,{
or(
These seem to work okay on simple nix files, and only take a few seconds (per line) on 2MB of attrsets. Let me know if you find any failure cases.