-
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
I could set up to autoformat my code upon save. However, import lines were not sorted.
From the docs I could figure out how to do it: move the cursor on an input line and press Ctrl+q Ctrl+s
. But how to get it automatically? When I save my code, I wanted it fully autoformatted: 1) format the code, and 2) sort the import lines.
Actually, it's possible, but I had to ask it on a forum. Add these lines to your settings.json
:
"[d]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "always"
}
},
Please add it to the documentation so people find it easily.
complyue
Metadata
Metadata
Assignees
Labels
No labels