nix-community / nix-ts-mode

An Emacs major mode for editing Nix expressions, powered by tree-sitter [maintainer=@remi-gelinas]
https://github.com/nix-community/nix-ts-mode
Other
50 stars 9 forks source link

support indenting attrset args according to RFC 166 #27

Open Atemu opened 4 months ago

Atemu commented 4 months ago

Trying to indent the args here does not work; it forces them onto column 0:

{
config,
pkgs,
lib,
...
}:

Perhaps the rule of "one further than the parent" could be generalised now that we have an official Nix style which lays out precise rules on that: https://github.com/NixOS/rfcs/pull/166

gekoke commented 4 months ago

I also observe this behavior after starting to use nixfmt with RFC-style.

marsam commented 3 months ago

I plan to work on this next week. Would you mind renaming the issue to "Support RFC 166 indentation"?