Skip to content

Commit

Permalink
feat(server/lsp_server): add error message that no errors were found/…
Browse files Browse the repository at this point in the history
…detected
  • Loading branch information
nedpals committed Mar 13, 2024
1 parent 08d14c3 commit 8e2680a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/lsp_server/lsp_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,14 @@ func newDaemonClientForServer(ctx context.Context, lspServer *LspServer) *daemon

uri := uri.File(report.Location.DocumentPath)
if report.ErrorCode >= 1 {
// add indication that there were no errors detected
if report.Received == 0 {
lspServer.conn.Notify(ctx, lsp.MethodWindowShowMessage, lsp.ShowMessageParams{
Type: lsp.MessageTypeError,
Message: "No error/s were detected.",
})
}

lspServer.unpublishedDiagnostics[uri] = []daemonTypes.ErrorReport{
report,
}
Expand Down

0 comments on commit 8e2680a

Please sign in to comment.