-
Notifications
You must be signed in to change notification settings - Fork 630
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
How I can setup indentation for empty lines? #1664
Comments
I think this isn't supported at the moment - as you say the options are either to truncate blank lines or leave them alone. I'll consider this a feature request. |
Thank you very much, I'll be waiting! |
I've encountered same problem. Please consider this feature. Thank you so much! |
Hello! I've encountered a problem. I can’t find information anywhere on how to configure the formatting of empty lines. Do I understand correctly that now in SwiftFormat you can either clear all spaces in empty lines or not format them at all?
I have these settings
![Screenshot 2024-04-01 at 16 23 41](https://private-user-images.githubusercontent.com/56874498/318429212-bcb4de0a-e2de-4b38-b765-34eaf341665e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4NjQzNjAsIm5iZiI6MTcyNDg2NDA2MCwicGF0aCI6Ii81Njg3NDQ5OC8zMTg0MjkyMTItYmNiNGRlMGEtZTJkZS00YjM4LWI3NjUtMzRlYWYzNDE2NjVlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI4VDE2NTQyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU1YThhNThmYzFlZDcwYjkxYWU1OTFiNzk2ZDNkYjJlY2VlZDAzZmI5YTc4MTA1ZDQ1MWQwMzZjZWViMWRhY2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.a8HXTeQZ3F-JtQuT34B977x6sty5qB1sEL7nAo7deRo)
--indent tab
,--tabwidth 4
,--trimwhitespace nonblank-lines
and SwiftFormat simply ignores this nightmare:Expected result (Ctrl+I in Xcode):
![Screenshot 2024-04-01 at 16 32 30](https://private-user-images.githubusercontent.com/56874498/318431637-7bc3dac4-ae5f-457e-9f80-b565fdfb2f3c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4NjQzNjAsIm5iZiI6MTcyNDg2NDA2MCwicGF0aCI6Ii81Njg3NDQ5OC8zMTg0MzE2MzctN2JjM2RhYzQtYWU1Zi00NTdlLTlmODAtYjU2NWZkZmIyZjNjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI4VDE2NTQyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI3NTkwNmY4NGU3MzdiYWY1NjcyZDkwMTZmYzE4NDY3ZWQwMDJmMTdhNWE2NGIyNzdmYmVkYTQyOTVjNDUyZTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.DKGWYP15GrimM2Ukkv0D-sRDluoucdTVIvpATc87vZI)
What do you think and what can you advise in this case? Thanx!
The text was updated successfully, but these errors were encountered: