Skip to content

Commit

Permalink
feat: send a new publishDiagnostics notification (#639)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShawkyZ authored Sep 2, 2024
1 parent 7493983 commit f340bd7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ Right now the language server supports the following actions:
]
}
```
- Custom Publish Diagnostics Notification
- method: `$/snyk.publishDiagnostics316`
- payload:
```json5
{
"uri": "/path/to/file",
"diagnostics": [],
}
```
- Authentication Notification
- method: `$/snyk.hasAuthenticated`
- payload:
Expand Down
1 change: 1 addition & 0 deletions application/server/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func registerNotifier(c *config.Config, srv types.Server) {
Msgf("publishing diagnostics overview for %s", params.Product)
case types.PublishDiagnosticsParams:
notifier(c, srv, "textDocument/publishDiagnostics", params)
notifier(c, srv, "$/snyk.publishDiagnostics316", params)
source := "LSP"
if len(params.Diagnostics) > 0 {
source = params.Diagnostics[0].Source
Expand Down

0 comments on commit f340bd7

Please sign in to comment.