diff --git a/README.md b/README.md index fcebb3ed2..1fdf21f6d 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,15 @@ Right now the language server supports the following actions: }, } ``` + - Summary Panel Status Notification + - method: `$/snyk.scanSummary` + - params: `types.ScanSummary` + - example: + ```json5 + { + "scanSummary": " Summary

" + } + ``` ### Commands diff --git a/application/server/notification.go b/application/server/notification.go index eff30dbcc..434a812fa 100644 --- a/application/server/notification.go +++ b/application/server/notification.go @@ -125,6 +125,9 @@ func registerNotifier(c *config.Config, srv types.Server) { Interface("source", source). Interface("diagnosticCount", len(params.Diagnostics)). Msg("publishing diagnostics") + case types.ScanSummary: + notifier(c, srv, "$/snyk.scanSummary", params) + logger.Debug().Msg("sending scan summary to client") case types.ApplyWorkspaceEditParams: handleApplyWorkspaceEdit(srv, params, &logger) logger.Debug(). diff --git a/internal/types/lsp.go b/internal/types/lsp.go index f71903466..c9c70a019 100644 --- a/internal/types/lsp.go +++ b/internal/types/lsp.go @@ -626,6 +626,10 @@ type SnykIsAvailableCli struct { CliPath string `json:"cliPath"` } +type ScanSummary struct { + ScanSummary string `json:"scanSummary"` +} + type ProgressToken string type ProgressParams struct {