Skip to content

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

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

Closed
ShoshinNikita opened this issue Mar 27, 2021 · 1 comment
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

@ShoshinNikita
Copy link

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 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 27, 2021
@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
Contributor

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
@golang golang locked and limited conversation to collaborators Apr 14, 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
None yet
3 participants