Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: fix hover with dot imports #45063

Closed
FlyingOnion opened this issue Mar 16, 2021 · 2 comments
Closed

x/tools/gopls: fix hover with dot imports #45063

FlyingOnion opened this issue Mar 16, 2021 · 2 comments

Comments

@FlyingOnion
Copy link

@FlyingOnion FlyingOnion commented Mar 16, 2021

Is your feature request related to a problem? Please describe.

import (
  . "somepkg"
)

var (
  // foo somepkg.Foo
  foo Foo
)

When the mouse move to Foo, the prompt show ..Foo
Especially, When Foo is used in an uncertain list arg (fooList ...Foo), the prompt will show .....Foo

Describe the solution you'd like
When import alias is ., show original package name somepkg.Foo, or just Foo directly.

@stamblerre stamblerre transferred this issue from golang/vscode-go Mar 16, 2021
@stamblerre stamblerre changed the title Set prompt properly when go package import alias is . x/tools/gopls: fix hover with dot imports Mar 16, 2021
@gopherbot gopherbot added this to the Unreleased milestone Mar 16, 2021
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v1.0.0 Mar 16, 2021
@muirdm
Copy link

@muirdm muirdm commented Mar 17, 2021

Similar to #44589. We should try to fix this bug systemically.

ShoshinNikita added a commit to ShoshinNikita/tools that referenced this issue Mar 17, 2021
Qualifier now returns empty package name for dot imports.

Fixes golang/go#44589
Fixes golang/go#45063
@gopherbot
Copy link

@gopherbot gopherbot commented Mar 17, 2021

Change https://golang.org/cl/302589 mentions this issue: internal/lsp/source: fix hover and completion with dot imports

@stamblerre stamblerre added this to To Do in gopls: v1.0.0 via automation Mar 25, 2021
@stamblerre stamblerre moved this from To Do to Done in gopls: v1.0.0 Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants