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
When a string has a long interpolation, the string gets split onto multiple lines but when this is done, the string is still absorbed. The trivial case with just one oversized interpolation (see examples) is technically legal under the RFC style as only the first and last line are not indented. This looks very odd however and is different to how function arguments are handled which have a similar problem of trailing content behind an otherwise absorbable term.
nixfmt will however also not indent intermediate interpolations ends which is definitely not legal. It also doesn't matter whether it's a single-line or multi-line string.
When a string is split onto multiple lines for whatever reason, we should probably just always not absorb which is in line with how function arguments work.
Description
When a string has a long interpolation, the string gets split onto multiple lines but when this is done, the string is still absorbed. The trivial case with just one oversized interpolation (see examples) is technically legal under the RFC style as only the first and last line are not indented. This looks very odd however and is different to how function arguments are handled which have a similar problem of trailing content behind an otherwise absorbable term.
nixfmt will however also not indent intermediate interpolations ends which is definitely not legal. It also doesn't matter whether it's a single-line or multi-line string.
When a string is split onto multiple lines for whatever reason, we should probably just always not absorb which is in line with how function arguments work.
Small example input
https://github.com/NixOS/nixpkgs/blob/29cda11adc0a21c51009073caca26ea10e506071/pkgs/by-name/fr/freetype/package.nix#L140-L142
Expected output
Actual output
The text was updated successfully, but these errors were encountered: