Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Multi-line strings in let/in-expressions are wrongly indented #288

Open
Ma27 opened this issue Mar 19, 2022 · 0 comments
Open

Multi-line strings in let/in-expressions are wrongly indented #288

Ma27 opened this issue Mar 19, 2022 · 0 comments
Labels
formatting Issue with the output format needs triage

Comments

@Ma27
Copy link
Member

Ma27 commented Mar 19, 2022

Input

{
  apps = let
    program = "${pkgs.writeScript "vim" ''
      #! /bin/sh
      exec ${package}/bin/foo
    ''}";
  in {
  };
}

Output

{
  apps =
    let
      program = "${pkgs.writeScript "vim" ''
      #! /bin/sh
      exec ${package}/bin/foo
    ''}";
    in
    { };
}

Desired output

{
  apps =
    let
      program = "${pkgs.writeScript "vim" ''
        #! /bin/sh
        exec ${package}/bin/foo
      ''}";
    in
    { };
}

Additional context

Tested on rev 79da650

Note: of course the snippet above doesn't make much sense, I tried to narrow it down to a more minimal example to demonstrate the issue. The code where I encountered the issue is available at https://gitlab.com/Ma27/nvim.nix/-/blob/b2b1a6d2889d8b2c5d7c60bb97586e26dc025935/flake.nix#L307-322

@Ma27 Ma27 added formatting Issue with the output format needs triage labels Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
formatting Issue with the output format needs triage
Projects
None yet
Development

No branches or pull requests

1 participant