You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
symbolScope controls which packages are searched for workspace/symbol requests. When the scope is "workspace", gopls searches only workspace packages. When the scope is "all", gopls searches all loaded packages, including dependencies and the standard library.
workspace: "workspace" matches symbols in workspace packages only.
This can be inconvenient, excluding a vendor directory from symbol indexing also prevents symbols from the standard library from being suggested, which is undesirable behavior.
Especially frustrating in combination with the new go tool directive.
Having the following in the go.mod suggests a lot of symbols from my tools as well.
Describe the solution you'd like
Add a 3rd property, that searches all loaded packages, including dependencies, the standard library but excluding vendor.
Describe alternatives you've considered
Option to pass in an array of properties of what should be matched.
seankhliao
changed the title
option to exclude vendor from suggested symbols or symbols from vendored tools
x/tools/gopls: option to exclude vendor from suggested symbols or symbols from vendored tools
Apr 24, 2025
gopherbot
added
Tools
This label describes issues relating to any tools in the x/tools repository.
gopls
Issues related to the Go language server, gopls.
labels
Apr 24, 2025
Is your feature request related to a problem? Please describe.
Right now, you can set the following preference only to
workspace
orall
.This can be inconvenient, excluding a vendor directory from symbol indexing also prevents symbols from the standard library from being suggested, which is undesirable behavior.
Especially frustrating in combination with the new go tool directive.
Having the following in the go.mod suggests a lot of symbols from my tools as well.
Describe the solution you'd like
Add a 3rd property, that searches all loaded packages, including dependencies, the standard library but excluding vendor.
Describe alternatives you've considered
Option to pass in an array of properties of what should be matched.
Available properties would have to be determined.
Example:
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: