Help us shape the future of Go! Take the 2026 Go Developer Survey

lsp

package
v1.233.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientCapabilities

type ClientCapabilities struct {
	TextDocument TextDocumentClientCapabilities `json:"textDocument"` // Text document capabilities
}

ClientCapabilities represents client capabilities.

type Diagnostic

type Diagnostic struct {
	Range              Range              `json:"range"`              // Range of the diagnostic
	Severity           DiagnosticSeverity `json:"severity"`           // Severity level
	Code               interface{}        `json:"code,omitempty"`     // Diagnostic code
	Source             string             `json:"source,omitempty"`   // Source (e.g., "yaml-language-server")
	Message            string             `json:"message"`            // Diagnostic message
	RelatedInformation []DiagnosticInfo   `json:"relatedInformation"` // Related diagnostic information
}

Diagnostic represents a diagnostic (error, warning, etc.).

type DiagnosticInfo

type DiagnosticInfo struct {
	Location Location `json:"location"` // Location of related information
	Message  string   `json:"message"`  // Related message
}

DiagnosticInfo represents related information for a diagnostic.

type DiagnosticSeverity

type DiagnosticSeverity int

DiagnosticSeverity represents the severity of a diagnostic.

const (
	DiagnosticSeverityError       DiagnosticSeverity = 1
	DiagnosticSeverityWarning     DiagnosticSeverity = 2
	DiagnosticSeverityInformation DiagnosticSeverity = 3
	DiagnosticSeverityHint        DiagnosticSeverity = 4
)

func (DiagnosticSeverity) MarshalText

func (d DiagnosticSeverity) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*DiagnosticSeverity) UnmarshalText

func (d *DiagnosticSeverity) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

type DidChangeTextDocumentParams

type DidChangeTextDocumentParams struct {
	TextDocument   VersionedTextDocumentIdentifier  `json:"textDocument"`   // The document that changed
	ContentChanges []TextDocumentContentChangeEvent `json:"contentChanges"` // Content changes
}

DidChangeTextDocumentParams represents params for textDocument/didChange notification.

type DidCloseTextDocumentParams

type DidCloseTextDocumentParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"` // The document that was closed
}

DidCloseTextDocumentParams represents params for textDocument/didClose notification.

type DidOpenTextDocumentParams

type DidOpenTextDocumentParams struct {
	TextDocument TextDocumentItem `json:"textDocument"` // The document that was opened
}

DidOpenTextDocumentParams represents params for textDocument/didOpen notification.

type InitializeParams

type InitializeParams struct {
	ProcessID             int                `json:"processId"`             // Process ID of parent
	RootURI               string             `json:"rootUri"`               // Root URI of workspace
	InitializationOptions interface{}        `json:"initializationOptions"` // Custom initialization options
	Capabilities          ClientCapabilities `json:"capabilities"`          // Client capabilities
}

InitializeParams represents initialization parameters.

type InitializeResult

type InitializeResult struct {
	Capabilities ServerCapabilities `json:"capabilities"` // Server capabilities
}

InitializeResult represents the result of initialization.

type Location

type Location struct {
	URI   string `json:"uri"`   // Resource URI
	Range Range  `json:"range"` // Range in the resource
}

Location represents a location inside a resource.

type Position

type Position struct {
	Line      int `json:"line"`      // Line position in a document (zero-based)
	Character int `json:"character"` // Character offset on a line (zero-based)
}

Position represents a position in a text document.

type PublishDiagnosticsCapabilities

type PublishDiagnosticsCapabilities struct {
	RelatedInformation bool `json:"relatedInformation"` // Support for related information
}

PublishDiagnosticsCapabilities represents diagnostics capabilities.

type PublishDiagnosticsParams

type PublishDiagnosticsParams struct {
	URI         string       `json:"uri"`         // Document URI
	Diagnostics []Diagnostic `json:"diagnostics"` // Diagnostics array
}

PublishDiagnosticsParams represents params for textDocument/publishDiagnostics notification.

type Range

type Range struct {
	Start Position `json:"start"` // Start position (inclusive)
	End   Position `json:"end"`   // End position (exclusive)
}

Range represents a range in a text document.

type ServerCapabilities

type ServerCapabilities struct {
	TextDocumentSync interface{} `json:"textDocumentSync"` // Text document sync kind
}

ServerCapabilities represents server capabilities.

type TextDocumentClientCapabilities

type TextDocumentClientCapabilities struct {
	PublishDiagnostics PublishDiagnosticsCapabilities `json:"publishDiagnostics"` // Diagnostics capabilities
}

TextDocumentClientCapabilities represents text document capabilities.

type TextDocumentContentChangeEvent

type TextDocumentContentChangeEvent struct {
	Range       *Range `json:"range,omitempty"`       // Optional range (if nil, text is full content)
	RangeLength int    `json:"rangeLength,omitempty"` // Optional length of range
	Text        string `json:"text"`                  // New text
}

TextDocumentContentChangeEvent represents a change to a text document.

type TextDocumentIdentifier

type TextDocumentIdentifier struct {
	URI string `json:"uri"` // Document URI
}

TextDocumentIdentifier identifies a text document.

type TextDocumentItem

type TextDocumentItem struct {
	URI        string `json:"uri"`        // Document URI
	LanguageID string `json:"languageId"` // Language identifier
	Version    int    `json:"version"`    // Document version
	Text       string `json:"text"`       // Document content
}

TextDocumentItem represents a text document.

type VersionedTextDocumentIdentifier

type VersionedTextDocumentIdentifier struct {
	TextDocumentIdentifier
	Version int `json:"version"` // Document version
}

VersionedTextDocumentIdentifier identifies a versioned text document.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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