Documentation
¶
Overview ¶
Package lsp bridges CalcMark's spec/impl/format layers to the Language Server Protocol. Dependencies flow inward: lsp → spec, lsp → impl, lsp → format. No package should ever import lsp.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SemanticTokensLegend ¶ added in v1.8.13
func SemanticTokensLegend() protocol.SemanticTokensLegend
SemanticTokensLegend returns the legend to register during initialize.
func ToLSPPosition ¶
ToLSPPosition converts a CalcMark 1-indexed position to a 0-indexed LSP position.
Types ¶
type DocumentRenderedParams ¶ added in v1.8.14
DocumentRenderedParams is the payload for the calcmark/documentRendered notification.
type DocumentSnapshot ¶
type DocumentSnapshot struct {
Source string
Document *specDoc.Document
Evaluator *implDoc.Evaluator
Diagnostics []specDoc.Diagnostic
HTML string
}
DocumentSnapshot holds the immutable evaluation results for a document. Request handlers read from the latest snapshot without locks.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the CalcMark LSP server.
func (*Server) ServeWebSocket ¶ added in v1.12.1
ServeWebSocket serves the LSP protocol over an existing WebSocket connection. This blocks until the connection is closed. Intended for embedding the LSP inside an HTTP server that handles the WebSocket upgrade externally.