Documentation
¶
Overview ¶
Package lsp serves the seamark graph to editors over the Language Server Protocol. The JSON-RPC layer in this file is deliberately self-contained and minimal (Content-Length framing, request dispatch): LSP and MCP are both JSON-RPC 2.0 over stdio, and this transport is the piece both adapters share (RFC-001 §5, implementation note).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// Root is the workspace directory as given by the client; it is
// widened to the git toplevel exactly like `seamark index`, so an
// editor that opens a repo SUBDIRECTORY still reads the repo's index
// instead of creating a stray empty one.
Root string
// DBPath overrides the index location (default: <root>/.seamark/index.db).
DBPath string
Version string
// Logf receives progress and warnings; nil discards them. Must write
// to stderr — stdout carries the protocol.
Logf func(format string, args ...any)
}
Options configures Serve.
type Position ¶
Position is zero-based; Line is all we use (seamark spans are line-grained, sidestepping LSP's UTF-16 column semantics).
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server answers LSP requests from the seamark index. Requests are handled sequentially on one goroutine: didSave triggers a synchronous reindex (fast enough at repo scale; the daemon will make this incremental).
type TextDocumentIdentifier ¶
type TextDocumentIdentifier struct {
URI string `json:"uri"`
}
TextDocumentIdentifier names a document by URI.