Closed MahdiBM closed 9 months ago
Hi @MahdiBM, thanks for your contribution and sorry for the late response. Code-wise this looks perfectly fine and like a great feature. But if I remember correctly, formatting the whole file and replacing all contents while typing might break the edit history. Will give it a try.
Command+Z works fine if that's a sign. I haven't noticed anything buggy about it, but feel free to try it yourself as I might have not tried something that you're thinking of.
Adds on-type formatting support after hitting "return" on non-empty lines.
This looks like this assuming you have the
"editor.formatOnType": true
:https://github.com/vknabel/vscode-swiftformat/assets/54685446/7c1ce16d-30f7-44ac-97ea-975ac137ce6c