1
0
mirror of https://github.com/golang/go synced 2024-11-18 11:04:42 -07:00

internal/lsp: swallow hover error over identifier not found

Fixes https://github.com/golang/go/issues/32967

Change-Id: I41245582f95f8a31e0d1990eac7aeb2a9c29cf05
GitHub-Last-Rev: 5d257b66138be4b9ea502af89ff48f0574c91718
GitHub-Pull-Request: golang/tools#140
Reviewed-on: https://go-review.googlesource.com/c/tools/+/186997
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
Jorge Araya 2019-07-24 16:13:56 +00:00 committed by Rebecca Stambler
parent 8bb11ff117
commit 4e8ec5a316

View File

@ -28,7 +28,7 @@ func (s *Server) hover(ctx context.Context, params *protocol.TextDocumentPositio
}
ident, err := source.Identifier(ctx, view, f, identRange.Start)
if err != nil {
return nil, err
return nil, nil
}
hover, err := ident.Hover(ctx, s.preferredContentFormat == protocol.Markdown, s.hoverKind)
if err != nil {