lsp

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package lsp implements the Warden Language Server Protocol server for the .warden DSL.

Both binaries reach the same code: the standalone `cmd/warden-lsp` and the `warden lsp` subcommand both delegate to lsp.Run, so editor configs can point at either entry point interchangeably.

Protocol layer: minimal hand-rolled JSON-RPC 2.0 with LSP framing (Content-Length headers). No external dependencies — reuses dsl/ for parsing, resolving, formatting, and AST queries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(in io.Reader, out io.Writer) error

Run starts the LSP server, reading JSON-RPC framed messages from in and writing responses + notifications to out. It blocks until the client disconnects (EOF on in) or sends an `exit` notification.

Both `cmd/warden-lsp` and `warden lsp` (subcommand) delegate here so the two entry points stay byte-for-byte equivalent. A nil return means "client disconnected cleanly"; callers typically convert that into a 0 exit code.

Types

This section is empty.

Jump to

Keyboard shortcuts

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