lsp

package
v1.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 22 Imported by: 0

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

func ToLSPPosition(pos ast.Position) protocol.Position

ToLSPPosition converts a CalcMark 1-indexed position to a 0-indexed LSP position.

func ToLSPRange

func ToLSPRange(r *ast.Range) protocol.Range

ToLSPRange converts a CalcMark Range to an LSP Range.

Types

type DocumentRenderedParams added in v1.8.14

type DocumentRenderedParams struct {
	URI  string `json:"uri"`
	HTML string `json:"html"`
}

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 NewServer

func NewServer() *Server

NewServer creates a new CalcMark LSP server.

func (*Server) RunStdio

func (s *Server) RunStdio() error

RunStdio starts the LSP server over stdio.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL