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
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@FlyingOnion
Copy link

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 Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels 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 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

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 on-deck via automation Mar 25, 2021
@stamblerre stamblerre moved this from To Do to Done in gopls on-deck Mar 25, 2021
@golang golang locked and limited conversation to collaborators Mar 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants