Skip to content

weird indentation for line comments between expr and semicolon #317

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
  ;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions