You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Absorption" is an "an alternative layout" that reduces indentation level, according to NixOS/rfcs#166. That is, the specification allows such "alternative" alongside the indent-after-newline right-hand-side style.
Given a chain of evaluated-to-list expressions chained by list concatenation operators (++) consisting of at least one of which is a multi-line literal list and two adjacent non-list-literal expressions, if the multi-line list literal gets absorbed, the adjacent non-list-literal terms will be squashed into the same line, producing a long, hard-to-read, and git-diff-unfriendly line of code.
Current implementation of nixfmtsometimes perform the above-mentioned absoption. In my opinion, such behavior should be avoided.
{buildInputs=["ee"# To patch /bin/sh shebangs."fff""gggggggg""hhh""iiiii""jjjjj""kkkkkkkkkkk"# Required at build time by SingularityCE]++lib.optionaltrue"lllll-lllll"++lib.optionalfalse"mmmmmmmm";}
The text was updated successfully, but these errors were encountered:
Description
"Absorption" is an "an alternative layout" that reduces indentation level, according to NixOS/rfcs#166. That is, the specification allows such "alternative" alongside the indent-after-newline right-hand-side style.
Given a chain of evaluated-to-list expressions chained by list concatenation operators (
++
) consisting of at least one of which is a multi-line literal list and two adjacent non-list-literal expressions, if the multi-line list literal gets absorbed, the adjacent non-list-literal terms will be squashed into the same line, producing a long, hard-to-read, and git-diff-unfriendly line of code.Current implementation of
nixfmt
sometimes perform the above-mentioned absoption. In my opinion, such behavior should be avoided.Small example input
Expected output
Actual output
The text was updated successfully, but these errors were encountered: