Added
- NixOS installation instructions
Changed
-
The indentation for function applications was improved,
so that indentation is now correct to the human eye in all cases:- name2 = function arg { - asdf = 1; - } - argument; + name2 = + function arg { + asdf = 1; + } + argument;
-
String interpolations (
"${something}"
)
now follow the same logic as parentheses ((something)
),
since ultimately, they are the same family of elements. -
Parentheses handling logic was rewritten
and by extension string interpolations as well.- ( - self: super: { - # ... - } - ) + (self: super: { + # ... + })
- builtins.map ( - pkg: { - name = "alejandra-${pkg.stdenv.targetPlatform.config}"; - value = pkg; - } - ) + builtins.map (pkg: { + name = "alejandra-${pkg.stdenv.targetPlatform.config}"; + value = pkg; + })
- ( - fenix.combine [ - fenix.latest.rustc - fenix.latest.toolchain - fenix.targets."wasm32-unknown-unknown".latest.rust-std - ] - ) + (fenix.combine [ + fenix.latest.rustc + fenix.latest.toolchain + fenix.targets."wasm32-unknown-unknown".latest.rust-std + ])
pkgs.writeText "other-modules.json" (l.toJSON - (l.mapAttrs - (pname: subOutputs: let - pkg = subOutputs.packages."${pname}".overrideAttrs (old: { - buildScript = "true"; - installMethod = "copy"; - }); - in "${pkg}/lib/node_modules/${pname}/node_modules") - outputs.subPackages)) + (l.mapAttrs + (pname: subOutputs: + let + pkg = subOutputs.packages."${pname}".overrideAttrs (old: { + buildScript = "true"; + installMethod = "copy"; + }); + in + "${pkg}/lib/node_modules/${pname}/node_modules") + outputs.subPackages))
- (with a; - /* - comment - */ - with b; - with c; { - a = 1; - b = 2; - }) + (with a; + /* + comment + */ + with b; + with c; { + a = 1; + b = 2; + })
In some cases it's possible to insert a newline after the
opening element (either(
or${
) to force a tall formatting.
Removed
- A few internal position counters, nothing visible from the outside.
- The new features cost a little of runtime speed,
but anyway we are still pretty fast. ⚡
What's Changed
- feat: even more simplification by @kamadorueda in #231
- perf: no need for pos_new by @kamadorueda in #233
- feat: try parentheses heuristics by @kamadorueda in #234
- perf: split children rewrittes by @kamadorueda in #235
- feat: add rustc to dev shell by @kamadorueda in #236
- feat: improve parentheses handling by @kamadorueda in #237
- test: add more apply cases by @kamadorueda in #238
- feat: better apply indentation by @kamadorueda in #239
- docs: document nixos installation by @kamadorueda in #243
- refactor: reuse parens on string interpol by @kamadorueda in #244
- feat: allow choosing loose parens by @kamadorueda in #245
Full Changelog: 0.7.0...1.0.0