Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
Fix server crashing on hover
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-hov committed Sep 22, 2023
1 parent 88c2f4a commit 74f2e8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/lsp/hover.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (s *server) Hover(ctx context.Context, reply jsonrpc2.Replier, req jsonrpc2
slog.Info("hover", "offset", offset)
pgf, err := file.ParseGno(ctx)
if err != nil {
reply(ctx, nil, errors.New("cannot parse gno file"))
return reply(ctx, nil, errors.New("cannot parse gno file"))
}
for _, spec := range pgf.File.Imports {
slog.Info("hover", "spec", spec.Path.Value, "pos", spec.Path.Pos(), "end", spec.Path.End())
Expand Down

0 comments on commit 74f2e8a

Please sign in to comment.