lspstdio

package
v1.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 30 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: AGPL-3.0-or-later

SPDX-License-Identifier: AGPL-3.0-or-later

SPDX-License-Identifier: AGPL-3.0-or-later

SPDX-License-Identifier: AGPL-3.0-or-later Package lspstdio implements the capability-free experimental editor transport.

SPDX-License-Identifier: AGPL-3.0-or-later

SPDX-License-Identifier: AGPL-3.0-or-later

SPDX-License-Identifier: AGPL-3.0-or-later

SPDX-License-Identifier: AGPL-3.0-or-later

SPDX-License-Identifier: AGPL-3.0-or-later

Index

Constants

View Source
const ContextWorkerMode = "--internal-context-worker"

ContextWorkerMode is an internal, fixed one-shot entry point of this executable.

View Source
const MaxBody = 1 << 20

Variables

View Source
var ErrExit = errors.New("exit before shutdown")
View Source
var ErrFraming = errors.New("invalid or truncated LSP frame")
View Source
var ErrLimit = errors.New("session frame limit reached")

Functions

func Serve

func Serve(ctx context.Context, in io.ReadCloser, out io.WriteCloser) error

Serve owns in and out and closes both before returning. Close must unblock any pending Read/Write; this is true of the command's owned standard streams. There are no workers, providers, filesystem accesses, or outstanding requests.

func ServeContextWorker

func ServeContextWorker(root string, in io.Reader, out io.Writer) int

ServeContextWorker must be dispatched before any other work in main. Normal input EOF terminates the one message, not the operation. Editor EOF cancels the parent's runner. The parent alone owns termination of this worker group.

func ServeSemantic

func ServeSemantic(parent context.Context, in io.ReadCloser, out io.WriteCloser, config SemanticConfig) error

ServeSemantic owns streams, a bounded gopls session and one pending request. Definitions observe open overlays; context preserves separately bound Core evidence and never promotes the overlay observation to Git authority.

Types

type SemanticConfig

type SemanticConfig struct {
	Executable, Root    string
	WorkspaceDriftGuard bool
}

SemanticConfig is operator-owned admission, never client-provided execution configuration.

Jump to

Keyboard shortcuts

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