alejandra icon indicating copy to clipboard operation
alejandra copied to clipboard

Allow empty lines in destructuring argument set

Open 2xsaiko opened this issue 2 years ago • 0 comments

I think empty lines should be allowed in argument sets as well, like it currently works for attrsets, lists and let/in (#28). This would be useful for when you want to separate semantically different arguments in a large list of them, for example utils, dependencies and extra flags for a package:

{
  fetchFromGitHub,
  lib,
  stdenv,

  cmake,
  epoxy,
  extra-cmake-modules,
  plasma5Packages,
  xorg,

  withColorScheme ? true,
  withKstyle ? false,
  withKwinEffects ? false,
  withPlasmaTheme ? true,
  withWindowDecoration ? true,
}: let
   # (snip)

Currently this gets formatted like this:

{
  fetchFromGitHub,
  lib,
  stdenv,
  cmake,
  epoxy,
  extra-cmake-modules,
  plasma5Packages,
  xorg,
  withColorScheme ? true,
  withKstyle ? false,
  withKwinEffects ? false,
  withPlasmaTheme ? true,
  withWindowDecoration ? true,
}: let
  # (snip)

2xsaiko avatar Aug 11 '22 01:08 2xsaiko