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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃搸 Create a new option to change new line style in the formatter #225

Closed
ematipico opened this issue Sep 10, 2023 · 0 comments
Closed
Labels
A-Formatter Area: formatter S-Help-wanted Status: you're familiar with the code base and want to help the project

Comments

@ematipico
Copy link
Member

ematipico commented Sep 10, 2023

Description

At the moment, we always print \n when we format code. We should give the option to change that.

The name should be --newline-style for the CLI, and newlineStyle in the configuration.

Available options:

  • unix => current behaviour, print \n;
  • windows => it will print \r\n;
  • native => it will print \n on UNIX OS and \r\n on Windows;
  • auto => it will use the line ending found in the first line of the file;

Names are taken/inspired from rustmft: https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=#newline_style

@ematipico ematipico added S-Help-wanted Status: you're familiar with the code base and want to help the project A-Formatter Area: formatter labels Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter S-Help-wanted Status: you're familiar with the code base and want to help the project
Projects
None yet
Development

No branches or pull requests

1 participant