Skip to content

nixfmt no longer defaults to formatting stdin #210

Description

@Dietr1ch

I'm getting this line at the top of my formatted buffers,

�[33mWarning: Bare invocation of nixfmt is deprecated. Use 'nixfmt -' for anonymous stdin.�[39m

Now nixfmt - needs to be called to signal we want it to process stdin. The currently available variable to tweak things, nix-nixfmt-bin, targets just the program path, but not the arguments it gets, so it's not sufficient to temporarily fix this with a customisation.

I'm not sure how to proceed since currently people might use other formatters that may or may not respect - being stdin, so it might require a breaking change or awkward backwards supporting code until people move into recent enough tools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions