You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…n enabled.
There are some circumstances where go langserver returns '```go\n\n```',
clients may render this empty markdown string. It's better to return
an empty string instead. Related issue:
golang/go#33000.
stamblerre
changed the title
x/tools/gopls: hover on import path returns 'go\n\n' with 'MarkupKind.Markdown' enabled.
x/tools/gopls: empty hover for an import spec
Jul 9, 2019
Since 'IdentifierInfo' doesn't contain ast node of import spec,
gopls will construct an empty string under plaintext mode and
'```go\n\n```' under markdown mode for *ast.ImportSpec.
For now, the hovering result of import spec is the corresponding node
format. Related issue: golang/go#33000.
Since 'IdentifierInfo' doesn't contain ast node of import spec,
gopls will construct an empty string under plaintext mode and
'```go\n\n```' under markdown mode for *ast.ImportSpec.
For now, the hovering result of import spec is the corresponding node
format. Related issue: golang/go#33000.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes. Reproduces at the master as well.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Hover on the import package.
What did you expect to see?
Should return an empty string or more consistent contents.
What did you see instead?
Returns
```go\n\n```
it will show an redundant empty box in vs code as the figure below shows.

The text was updated successfully, but these errors were encountered: