patterngoCritical
Execute gofmt on file save in IntelliJ
Viewed 0 times
savefileintellijgofmtexecute
Problem
I use IntelliJ with the Golang plugin. Is it possible to configure the IDE to execute gofmt on file save?
Solution
Of course you can.
- install File Watchers plugin
- open "Preferences->Tools->File Watchers" & Add a new watcher
- set
File Type:Go,Program: the abosolute path ofgofmt,Arguments:-w $FilePath$
- click
OK
Context
Stack Overflow Q#33774950, score: 149
Revisions (0)
No revisions yet.