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: invalid hover when multiple types declared inside the same block #45261

Open
ShoshinNikita opened this issue Mar 27, 2021 · 1 comment · May be fixed by golang/tools#293
Open

x/tools/gopls: invalid hover when multiple types declared inside the same block #45261

ShoshinNikita opened this issue Mar 27, 2021 · 1 comment · May be fixed by golang/tools#293
Labels
Milestone

Comments

@ShoshinNikita
Copy link

@ShoshinNikita ShoshinNikita commented Mar 27, 2021

gopls version: v0.6.9

package main

// Type declaration block
type (
	// A is a struct
	A struct {
		f int
	}

	B int
)

type (
	// C is a struct
	C struct {
		f int
	}
)
  • Hover for A doesn't contain type name

    image

  • Hover for B doesn't contain type name and comment Type declaration block

    image

  • Hover for C

    image

@gopherbot gopherbot added this to the Unreleased milestone Mar 27, 2021
ShoshinNikita added a commit to ShoshinNikita/tools that referenced this issue Mar 27, 2021
ShoshinNikita added a commit to ShoshinNikita/tools that referenced this issue Mar 27, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Mar 27, 2021

Change https://golang.org/cl/305189 mentions this issue: internal/lsp/source: update process of hover signature creation for type declarations

@stamblerre stamblerre modified the milestones: Unreleased, gopls/v0.6.10 Mar 30, 2021
ShoshinNikita added a commit to ShoshinNikita/tools that referenced this issue Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants