doushi7805 2016-05-04 20:30
浏览 525
已采纳

仅在打开文件上使用Intellij File Watcher

I've been using the Intellij Golang plugin recently (it's great) but I've been running into an issue with the File Watchers I set up. My working directory is set to my $GOPATH directory and I would like to be able to run golint and goimports after I save a file I'm working on. The issue I have is if I use git to clone a repo the next time I open Intellij it runs both golint and goimports on all the newly imported files which can take a long time for large projects. Is there a way to set up File Watcher so it only watches a file that is currently open? I added a screenshot of my current settings below:

enter image description here

  • 写回答

2条回答 默认 最新

  • douyanqu9722 2016-05-05 02:16
    关注

    Open Watcher setting -> Scope , change it to Open Files enter image description here

    If you wanna more control over the plugin, you can have a look at the official doc

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?