lsp

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, conn io.ReadWriteCloser, opts Options) (int, error)

Run serves LSP traffic over a stdio-compatible connection until the client sends exit or the transport fails.

Types

type Options

type Options struct {
	Logger *slog.Logger

	// PublishDiagnostics optionally overrides outbound diagnostics publishing.
	// It is primarily intended for tests.
	PublishDiagnostics func(context.Context, *protocol.PublishDiagnosticsParams) error
}

Options configures the LSP transport service.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server handles the minimal LSP lifecycle required for phase 3.

func NewServer

func NewServer(opts Options) *Server

NewServer constructs a minimal mergeway LSP lifecycle server.

func (*Server) ExitCode

func (s *Server) ExitCode() int

ExitCode reports the exit code selected by the server lifecycle so far.

func (*Server) Handle

func (s *Server) Handle(ctx context.Context, reply jsonrpc2.Replier, req jsonrpc2.Request) error

Handle dispatches the minimal lifecycle methods needed for the initial LSP surface.

Jump to

Keyboard shortcuts

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