nix-mode icon indicating copy to clipboard operation
nix-mode copied to clipboard

nix-indent-line doesn't indent if-expressions nicely

Open nightkr opened this issue 7 years ago • 0 comments

The following code:

let
x = if a
then if b
then c
else d
else if e
then f
else g;
in
x

is indented by nix-indent-line as:

let
  x = if a
    then if b
    then c
    else d
    else if e
    then f
    else g;
in
  x

but would (IMO) be much clearer as:

let
  x = if a
    then if b
      then c
      else d
    else if e
      then f
      else g;
in
  x

nightkr avatar Jun 20 '18 18:06 nightkr