Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforcing spaces in containers? #108

Closed
DavHau opened this issue Feb 15, 2022 · 3 comments
Closed

Enforcing spaces in containers? #108

DavHau opened this issue Feb 15, 2022 · 3 comments
Labels
component | style Modifications to the formatting rules help wanted Extra attention is needed status | it is a good thing We agree it is good to implement this type | feature request New feature or request

Comments

@DavHau
Copy link

DavHau commented Feb 15, 2022

I see that you once tried changing the behavior of nixpkgs-fmt to no space (nix-community/nixpkgs-fmt#280).
Any reason why you changed your mind?

In the equivalent discussion on nixpkgs-fmt, it seemed like everyone kind of agreed that it doesn't impact readability and just results in more horizontal space taken. Also it was shown that most code in nixpkgs uses no space (Not that I think this is important, but at least we know that not many people there are going to complain about spaces being removed).

@kamadorueda
Copy link
Owner

In the equivalent discussion on nixpkgs-fmt, it seemed like everyone kind of agreed that it doesn't impact readability
and just results in more horizontal space taken. Also it was shown that most code in nixpkgs uses no space

I'm ready to go for:

  • []
  • [1]
  • [
      1
      2
    ]
    

There is some stuff we haven't thought in a rational way about, are simple to implement, and would be awesome to do before the 1.0 release

@kamadorueda kamadorueda added component | style Modifications to the formatting rules help wanted Extra attention is needed status | needs discussing Needs discussion type | feature request New feature or request labels Feb 16, 2022
@kamadorueda
Copy link
Owner

Small example of what other languages do:

const x = [];
const x = [1];
const x = [1, 2];
const x = {};
const x = { a: b };
const x = { a: b, c: d };

@kamadorueda
Copy link
Owner

Solved in: #113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component | style Modifications to the formatting rules help wanted Extra attention is needed status | it is a good thing We agree it is good to implement this type | feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants