lsp

package
v1.8.12 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 19 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 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 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