I'm using GoLand IDE to code in Go. When I save a file, I'd like that the unused imports disappear (like VS code)
I have enable "Optimize imports" in "Code" -> "Show reformat file dialog". But when I save the file, imports it's still present
I'm using GoLand IDE to code in Go. When I save a file, I'd like that the unused imports disappear (like VS code)
I have enable "Optimize imports" in "Code" -> "Show reformat file dialog". But when I save the file, imports it's still present
Adjusted due to new version of Goland:
The setting has meanwhile moved to the File Watchers. Here you can add a new file watcher at the bottom and select goimports
from the list.
Original:
Are you looking for this setting?
Edit:
Setting this to go imports
will do both: