I'm using Visual Studio Code to create a game in Unity so I'm programming in C#. I'd like to know how to:
A) Force the editor to remove unused imports when I save. B) Remove all unused imports, project-wide
I see allusions to this snippet when I google around:
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true
}
Neither one does anything for me.
This worked for me !
Press ctrl+ shift+ P
Search settings.json
Add the following code
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With