Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocumentContext ¶
type DocumentContext struct { Ctx context.Context URI lsp.DocumentURI Diagnostics []lsp.Diagnostic }
DocumentContext contains data about the document on which we have performed the diagnostics on.
type Notifier ¶
type Notifier struct { SessionCtx context.Context TSCDocs chan DocumentContext CloseTSCDocsOnce sync.Once }
Notifier contains a channel representing TSC documents with diagnostics, as well as methods for publishing new diagnostics.
func NewNotifier ¶
NewNotifier creates a new Notifier instance for running a goroutine that sends out diagnostics to all documents in the channel.
func (*Notifier) Diagnose ¶
func (n *Notifier) Diagnose(ctx context.Context, uri lsp.DocumentURI, diagnostics []lsp.Diagnostic)
Diagnose will enqueue a document and a slice of diagnostics for publishing. Notifications will be delivered in the order of the queue.
Click to show internal directories.
Click to hide internal directories.