lsp

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MPL-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package lsp implements the GOWDK Language Server Protocol entrypoint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FramingError added in v0.13.0

type FramingError struct {
	Code    string
	Fatal   bool
	Message string
	Limit   int64
	Actual  int64
}

FramingError classifies an LSP transport failure without retaining or exposing the raw header or message body. Framing failures are fatal because the next byte boundary cannot be trusted without consuming attacker-sized input.

func (*FramingError) Error added in v0.13.0

func (err *FramingError) Error() string

type Limits added in v0.13.0

type Limits struct {
	MaxHeaderBytes       int64
	MaxHeaderLineBytes   int
	MaxHeaderCount       int
	MaxMessageBytes      int64
	MaxDocumentBytes     int64
	MaxOpenDocumentBytes int64
	MaxOpenDocuments     int
}

Limits bounds one LSP session. Byte limits count UTF-8 bytes, matching LSP transport framing and Go string storage rather than Unicode code points.

func DefaultLimits added in v0.13.0

func DefaultLimits() Limits

DefaultLimits returns generous finite defaults for ordinary GOWDK projects.

type ProjectOptions added in v0.13.0

type ProjectOptions struct {
	Root    string
	Modules []string
	Limits  Limits
}

ProjectOptions scopes configured source discovery for one LSP session.

type Server

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

Server handles one LSP session.

func NewProjectServer added in v0.13.0

func NewProjectServer(config gowdk.Config, options ProjectOptions) *Server

NewProjectServer returns a language server scoped to one configured project.

func NewServer

func NewServer(config gowdk.Config) *Server

NewServer returns a language server using the provided compiler config.

func (*Server) Serve

func (server *Server) Serve(in io.Reader, out io.Writer) error

Serve runs the JSON-RPC message loop until the client sends exit or input closes.

Jump to

Keyboard shortcuts

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