| 25 Oct 2025 |
@dawnofmidnight:catgirl.cloud | * ah right, i forgot that this would be there. blocks are compelling (though i personally don't think it justifies the whole thing) | 13:57:15 |
emily | mostly it's the main thing I can imagine wanting <| for | 13:57:31 |
emily | though not sure how I feel about stdenv.mkDerivation <| finalAttrs: …, that seems comparably noisy to the parens again :) | 13:58:05 |
emily | the parens only really annoy me a bunch when they make nixfmt do something I hate, like
foo (
a: b:
…
)
| 13:58:33 |
emily | avoiding rightward drift of entire file bodies can require some unpleasant contortions | 13:59:02 |
emily | I ruled out several draft ideas for improvements to Nixpkgs package structure just because they would add another layer of indentation to every single package 😅 | 14:00:33 |
llakala | i still don't use a formatter for my config because i can't stand any of them | 15:25:10 |
llakala | nixfmt is addicted to indentation | 15:25:16 |
llakala | i generally think nixfmt is good at what it was designed for (being a nixpkgs formatter) | 15:26:18 |
llakala | but little things, like this:
{ lib, pkgs, config, ... }:
becoming this:
{
lib,
pkgs,
config,
...
}:
| 15:29:00 |
llakala | and this:
let
# let content
in {
becoming this:
let
# let content
in
{
| 15:30:21 |
llakala | are the kind of things i can't stand | 15:30:35 |
llakala | my biggest issue was fixed recently, which i'm thankful for | 15:31:04 |
llakala | (strings with comments for injections don't get indented anymore | 15:31:19 |
llakala | * (strings with comments for injections don't get indented anymore) | 15:31:24 |
aftix | I use alejandra | 15:31:24 |
llakala | i can't deal with alejandra not putting spaces around list elements | 15:31:56 |
aftix | wdym? like between the first/last element and the brackets? | 15:33:30 |
llakala | before:
{
x = [ 1 ];
}
after:
{
x = [1];
}
| 15:34:38 |
Katalin 🔪 | that’s how lists are formatted pretty much in every other language though, I prefer that style. however I don’t like it not putting spaces inside {} haha | 15:48:45 |
piegames | you can't reasonably have that in Nix, unfortunately | 18:04:18 |
Katalin 🔪 | oh? why not? | 18:05:54 |
Katalin 🔪 | part of the parser design that makes this not work? apparently the parser is pretty cursed | 18:06:54 |
piegames | https://github.com/NixOS/rfcs/pull/148#issuecomment-3218177364 | 18:08:03 |
piegames | I think that can't work because functions don't have a dedicated start token, but not sure | 18:10:30 |
Katalin 🔪 | riiiight. | 18:15:26 |
piegames | I'm a bit wary of that, because in function chains you can do h . g . f a equivalently as h $ g $ f a, which doesn't matter too much in Haskell, but in Nix the former would lead to much worse error messages in case of type errors | 18:15:29 |
Katalin 🔪 | that sucks :( | 18:15:32 |
emily | this seems resolvable, right? f <| x: … is never valid syntax, so there is no ambiguity, even without changing the precedence | 18:16:51 |
emily | (but maybe annoying to make happen) | 18:16:54 |