Skip to content
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

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatting Issue with the output format needs triage
Projects
None yet
Development

No branches or pull requests

1 participant