diff --git a/internal/lsp/cache/load.go b/internal/lsp/cache/load.go index 212e64febc0..924987ada05 100644 --- a/internal/lsp/cache/load.go +++ b/internal/lsp/cache/load.go @@ -87,7 +87,12 @@ func (s *snapshot) load(ctx context.Context, allowNetwork bool, scopes ...interf } query = append(query, fmt.Sprintf("file=%s", uri.Filename())) case moduleLoadScope: - query = append(query, fmt.Sprintf("%s/...", scope)) + switch scope { + case "std", "cmd": + query = append(query, string(scope)) + default: + query = append(query, fmt.Sprintf("%s/...", scope)) + } case viewLoadScope: // If we are outside of GOPATH, a module, or some other known // build system, don't load subdirectories.