Goland Find Usages and Find in Path

Hello.  Is there a way to for the Find Usages and Find in Path to exclude vendor directories?  Also, can I click on a function to find its usages, but it is vendored in some folders, can it still find the references.

As example, I want to click on a function in /core/example.go and Find Usages in files.go and files2.go without picking up anything in /service1/vendor/... or /service2/vendor/...  Also, if I want to Find in Path for some text in /service1/... and /service2/... but I don't want to pickup anything in vendor directories.

/core/...

/service1/files.go

/service1/vendor/core/...

/service2/files2.go

/service2/vendor/core/...

Thanks,
Sam

 

0
正式评论

When you invoke Find Usages, you can open settings (see screenshot) and set a search scope there. To exclude vendor, select "Project" scope, to include vendor -- "Project and Libraries". The same idea applies to Find in Path, "Scope" setting is available right under the search bar.

请先登录再写评论。