-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Provide Line Ending option #285
Comments
Should .editorconfig file be taken into account? [*.xaml]
end_of_line = crlf This is an absolutely crucial feature. |
@cyberbot band-aid solution: Try running it with WSL (install it under Linux first) Running it from ms-dos should look like this: wsl /home/<username>/.dotnet/tools/xstyler -p -r -d Wpf -l Minimal |
Have you configured git to handle line endings? If not, XAML Styler may not be the only offender, and this could help address it universally. If so, and XAML Styler is messing with line endings, I think we should treat this as a bug. We should not be changing line endings, and instead, if we can detect what they are in the input file, I would suggest we ensure it is preserved in the output. |
My project doesn't use git at the moment. So yes, XAML Styler is messing with line endings. |
@grochocki There are other issues at play here. Consider a working environment with Windows OS, two IDEs VS and VS Code, as well as WSL.
|
@grochocki any thoughts on this? |
@grochocki, I wanted to introduce XamlStyler to my team's project but it overrides Version control settings could be a band-aid solution to fix the line-ending but my team is using I agree with @virzak that XamlStyler can benefit a lot with either respecting the |
Is your feature request related to a problem? Please describe.
I usually prefer to have LF as my line endings instead of CRLF. Although I use an extension, Line Endings Unifier, to accomplish this, XAML Styler will always change the line endings to CRLF. Even if Line Endings Unifier changes the line endings afterwards, the result is that Visual Studio will claim the entire file has been changed because of the line endings being switched back and forth.
Describe the solution you'd like
I'd like to see an option in XAML Styler to set the line endings, with the options being CRLF, LF or CR (basically Windows, Unix and Mac line endings).
Describe alternatives you've considered
Using Line Endings Unifier does fix the line endings (when set to apply to .xaml) after saving and does so after XAML Styler has fixed the formatting. It does not get around the problem described at the top regarding Visual Studio showing the entire file as changed.
The text was updated successfully, but these errors were encountered: