GoLand ignores a file in my vendor folder
I have a file buried very deep in my vendor folder which some types in it that are used all over the place in my projects. For some reason, GoLand doesn't pick this file up. Here are my symptoms:
- The icon is not the same as other Go files. I checked the permissions, and the file permissions match across everything else.
- No types, functions, or methods are recognized from within the file.
- If I rename the file, GoLand picks up the contained types and happily gives me code completion on it. (I don't know if it matters, but the file is named array.go. Any other name seems to work fine, just not array.go).
- Regardless of the name, "go build" works just fine. Whatever this is seems to be GoLand specific.
I would love to fix this so I don't have to keep a floating rename around in my changed files. Any ideas?
请先登录再写评论。
It looks like the "array.go" file was accidentally marked as a plain text file instead of a Go file.
To resolve this, please go to "Settings/Preferences | Editor | File Types" then search for the "Text" type in the "Recognized file types:" section and then, under "Registered patterns:", look for the "array.go".
You can also have a look at the "Ignore files and folders" input box at the bottom of the mentioned page.