vscode-swiftformat icon indicating copy to clipboard operation
vscode-swiftformat copied to clipboard

Format previous line on 'Enter' key

Open vinocher-bc opened this issue 1 year ago • 5 comments

When the 'Enter' key is pressed, format the previous line because the user has usually moved to a new empty line. This is the most common scenario.

Also, format only the previous line instead of the entire document for better performance and because formatting the entire doc may conflict with "editor.formatOnSaveMode": "modifications" (See Only format modified text.)

Previously, the entire document was formatted if the new line was non-empty.

vinocher-bc avatar Jun 18 '24 23:06 vinocher-bc