diff --git a/internal/lsp/cache/token.go b/internal/lsp/cache/token.go index 6cd0d8e5c3..0b2b697676 100644 --- a/internal/lsp/cache/token.go +++ b/internal/lsp/cache/token.go @@ -84,5 +84,6 @@ func tokenFile(ctx context.Context, c *cache, fh source.FileHandle) (*token.File if tok == nil { return nil, fmt.Errorf("no token.File for %s", fh.Identity().URI) } + tok.SetLinesForContent(buf) return tok, nil }