Skip to content

weird indentation for line comments between expr and semicolon #317

@rszyma

Description

@rszyma

Description

This is a bit of an edge case, where indentation doesn't feel right. I suspect not many people write comments like this, but still, there's now for sure at least 1 person affected (hi!).

FWIW, inherit (that has many items) is already being formatted similarly to what I think as "expected output" for my example.

Small example input

{ pkgs }:
{
  nix.package =
    # pkgs.nixVersions.stable
    pkgs.nixVersions.git
    # inputs.nix-git.packages.${pkgs.system}.default
    ;
}

Expected output

(no changes)

{ pkgs }:
{
  nix.package =
    # pkgs.nixVersions.stable
    pkgs.nixVersions.git
    # inputs.nix-git.packages.${pkgs.system}.default
    ;
}

Actual output

{ pkgs }:
{
  nix.package =
    # pkgs.nixVersions.stable
    pkgs.nixVersions.git
  # inputs.nix-git.packages.${pkgs.system}.default
  ;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions