Versions in this module Expand all Collapse all v0 v0.1.0 Sep 8, 2026 Changes in this version + var ErrCapabilityUnavailable = errors.New("LSP server does not advertise the requested capability") + var ErrEncodingUnsupported = errors.New("LSP server selected an unsupported position encoding") + var ErrResultUnsupported = errors.New("LSP server returned an unsupported location result") + var ErrServerRequestUnsupported = errors.New("LSP server made an unsupported client request") + var ErrStart = errors.New("LSP process could not be started") + type Capabilities struct + Declaration bool + Definition bool + DocumentSymbols bool + Hover bool + Implementation bool + OpenClose bool + PositionEncoding string + References bool + TextDocumentSync string + TypeDefinition bool + WorkspaceSymbols bool + type Command struct + Args []string + Dir string + Env []string + Path string + Stderr io.Writer + type DefinitionTarget struct + func PrepareDocument(path, languageID string) (*DefinitionTarget, error) + func PrepareTarget(path string, line, column uint32, languageID string) (*DefinitionTarget, error) + type Hover struct + Content []HoverBlock + Range *Range + type HoverBlock struct + Kind string + Language string + Text string + type Location struct + Path string + Range Range + type Point struct + Column uint32 + Line uint32 + type PositionError struct + Message string + func (e *PositionError) Error() string + type Range struct + End Point + Start Point + type Session struct + func Start(ctx context.Context, command Command, workspace, version string) (*Session, error) + func (s *Session) Broken() error + func (s *Session) Capabilities() Capabilities + func (s *Session) Close() error + func (s *Session) Declaration(ctx context.Context, target *DefinitionTarget) ([]Location, error) + func (s *Session) Definition(ctx context.Context, target *DefinitionTarget) ([]Location, error) + func (s *Session) DocumentSymbols(ctx context.Context, target *DefinitionTarget) ([]Symbol, error) + func (s *Session) Hover(ctx context.Context, target *DefinitionTarget) ([]Hover, error) + func (s *Session) Implementation(ctx context.Context, target *DefinitionTarget) ([]Location, error) + func (s *Session) References(ctx context.Context, target *DefinitionTarget, includeDeclaration bool) ([]Location, error) + func (s *Session) Status() Status + func (s *Session) TypeDefinition(ctx context.Context, target *DefinitionTarget) ([]Location, error) + func (s *Session) WorkspaceSymbols(ctx context.Context, query string) ([]Symbol, error) + type Status struct + Capabilities Capabilities + ServerName string + ServerVersion string + type Symbol struct + Children []Symbol + ContainerName *string + Deprecated bool + Detail *string + Kind uint32 + KindName string + Name string + Path string + Range Range + SelectionRange *Range