@@ -22,6 +22,7 @@ import (
22 "github.com/charmbracelet/crush/internal/proto"
22 "github.com/charmbracelet/crush/internal/proto"
23 "github.com/charmbracelet/crush/internal/pubsub"
23 "github.com/charmbracelet/crush/internal/pubsub"
24 "github.com/charmbracelet/crush/internal/session"
24 "github.com/charmbracelet/crush/internal/session"
25+ "github.com/charmbracelet/x/powernap/pkg/lsp/protocol"
27// ClientWorkspace implements the Workspace interface by delegating all
28// ClientWorkspace implements the Workspace interface by delegating all
@@ -359,8 +360,27 @@ func (w *ClientWorkspace) LSPGetStates() map[string]LSPClientInfo {
359 return result
360 return result
362−func (w *ClientWorkspace) LSPGetClient(_ string) (*lsp.Client, bool) {
363+func (w *ClientWorkspace) LSPGetDiagnosticCounts(name string) lsp.DiagnosticCounts {
363− return nil, false
364+ diags, err := w.client.GetLSPDiagnostics(context.Background(), w.workspaceID(), name)
366+ return lsp.DiagnosticCounts{}
368+ var counts lsp.DiagnosticCounts
369+ for _, fileDiags := range diags {
370+ for _, d := range fileDiags {
372+ case protocol.SeverityError:
374+ case protocol.SeverityWarning:
376+ case protocol.SeverityInformation:
377+ counts.Information++
378+ case protocol.SeverityHint:
366// -- Config (read-only) --
386// -- Config (read-only) --