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

Feature request: maintain absent whitespace around binary operations #780

Open
kbarros opened this issue Nov 26, 2023 · 1 comment
Open

Comments

@kbarros
Copy link

kbarros commented Nov 26, 2023

Is it possible to add an option that would maintain absence of whitespace around binary operations?

Examples where this might come up in a code base:

  • Keep [1/2, 1/3, 0] instead of [1 / 2, 1 / 3, 0].
  • Keep x + y*z instead of x + y * z.
  • Keep f(R; N=2k+1) instead of f(R; N=2k + 1).

Misleading cases would also be allowed, e.g., keep x+y * z instead of x + y * z.

There was some previous related discussion but I'm wondering if the approach described in this Issue is easier to implement?

@kbarros kbarros changed the title Feature request: maintain absence whitespace around binary operations Feature request: maintain absent whitespace around binary operations Nov 27, 2023
@RaulDurand
Copy link

RaulDurand commented Mar 16, 2024

This is what I always wanted in a code formatter. Currently, the extra spaces make the code more difficult to read. Perhaps, a operators black-list could be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants