Skip to content

Commit 2b2ab33

Browse files
heschistamblerre
authored andcommitted
internal/lsp/source: don't unconditionally name imports
In CL 205501 I thoughtlessly set import name to package name, but really we only want to name imports when goimports would do it. For now, it's better to not name them and let the usual imports code add a name if necessary. Fixes golang/go#35397. Change-Id: Id0df866f95e5e86ed72b25fbd1a7224c79ee8084 Reviewed-on: https://go-review.googlesource.com/c/tools/+/205657 Run-TryBot: Heschi Kreinick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Rebecca Stambler <[email protected]> (cherry picked from commit c2ac6c2) Reviewed-on: https://go-review.googlesource.com/c/tools/+/205738 Reviewed-by: Heschi Kreinick <[email protected]>
1 parent 3af9f3e commit 2b2ab33

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

internal/lsp/source/completion.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,6 @@ func (c *completer) lexical() error {
730730
obj := types.NewPkgName(0, nil, pkg.Name(), pkg)
731731
c.found(obj, stdScore, &importInfo{
732732
importPath: pkg.Path(),
733-
name: pkg.Name(),
734733
})
735734
}
736735
}

0 commit comments

Comments
 (0)