Skip to content

Commit

Permalink
only add codeactionresolver if diagnostics exist
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed Feb 20, 2024
1 parent 47b34cd commit e2fd5f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion languageserver/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3277,7 +3277,7 @@ func convertDiagnostic(
severity = protocol.SeverityError
}

if codeActionsResolver == nil {
if codeActionsResolver == nil && len(linterDiagnostic.SuggestedFixes) > 0 {
codeActionsResolver = func() []*protocol.CodeAction {
return conversion.SuggestedFixesToCodeActions(
linterDiagnostic.SuggestedFixes,
Expand Down

0 comments on commit e2fd5f7

Please sign in to comment.