Documentation
¶
Overview ¶
Package lsptypes contains the types for the LSP.
Index ¶
- type ChangeType
- type CompletionProvider
- type ContentChange
- type DidChangeParams
- type DidCloseParams
- type DidOpenParams
- type Document
- type Hover
- type HoverParams
- type InitializeResult
- type MarkupContent
- type ParameterInformation
- type Position
- type Range
- type ServerCapabilities
- type ServerInfo
- type SignatureHelp
- type SignatureHelpParams
- type SignatureHelpProvider
- type SignatureInformation
- type TextDocument
- type TextDocumentIdentifier
- type TextDocumentItem
- type TextDocumentSync
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeType ¶
type ChangeType int
ChangeType represents the change type.
const ( ChangeTypeNone ChangeType = iota ChangeTypeFull ChangeTypeIncremental )
ChangeTypeFull represents the full change type. For more information, see the specification:
type CompletionProvider ¶
type CompletionProvider struct {
TriggerCharacters []string `json:"triggerCharacters"`
}
CompletionProvider represents the completion provider capabilities.
type ContentChange ¶
type ContentChange struct {
Range *Range `json:"range"`
RangeLength int `json:"rangeLength"`
Text string `json:"text"`
}
ContentChange represents a content change.
type DidChangeParams ¶
type DidChangeParams struct {
ContentChanges []ContentChange `json:"contentChanges"`
TextDocument TextDocumentItem `json:"textDocument"`
}
DidChangeParams represents the parameters for a didChange request.
type DidCloseParams ¶
type DidCloseParams struct {
TextDocument TextDocumentItem `json:"textDocument"`
}
DidCloseParams represents the parameters for a didClose request.
type DidOpenParams ¶
type DidOpenParams struct {
TextDocument TextDocumentItem `json:"textDocument"`
}
DidOpenParams represents the parameters for a didOpen request.
type Document ¶
type Document struct {
Text string `json:"text"`
Version int `json:"version"`
NumLines int `json:"numLines"`
LineLengths []int `json:"lineLengths"`
}
Document represents a document.
func (*Document) GetLineLength ¶
GetLineLength returns the length of the line at the given index.
type HoverParams ¶
type HoverParams struct {
TextDocument TextDocument `json:"textDocument"`
Position Position `json:"position"`
}
HoverParams represents the parameters for a hover request.
type InitializeResult ¶
type InitializeResult struct {
ServerInfo ServerInfo `json:"serverInfo"`
Capabilities ServerCapabilities `json:"capabilities"`
}
InitializeResult represents the result for the initialize method.
type MarkupContent ¶
MarkupContent represents documentation content.
type ParameterInformation ¶
type ParameterInformation struct {
Label string `json:"label"`
Documentation *MarkupContent `json:"documentation,omitempty"`
}
ParameterInformation represents information about a function parameter.
type ServerCapabilities ¶
type ServerCapabilities struct {
TextDocumentSync TextDocumentSync `json:"textDocumentSync"`
DefinitionProvider bool `json:"definitionProvider"`
CompletionProvider CompletionProvider `json:"completionProvider"`
HoverProvider bool `json:"hoverProvider"`
SignatureHelpProvider SignatureHelpProvider `json:"signatureHelpProvider"`
}
ServerCapabilities represents the capabilities of the server.
type ServerInfo ¶
ServerInfo represents the server information.
type SignatureHelp ¶
type SignatureHelp struct {
Signatures []SignatureInformation `json:"signatures"`
ActiveSignature int `json:"activeSignature"`
ActiveParameter int `json:"activeParameter"`
}
SignatureHelp represents the signature help response.
type SignatureHelpParams ¶
type SignatureHelpParams struct {
TextDocument TextDocumentIdentifier `json:"textDocument"`
Position Position `json:"position"`
}
SignatureHelpParams represents the parameters for a signature help request.
type SignatureHelpProvider ¶
type SignatureHelpProvider struct {
TriggerCharacters []string `json:"triggerCharacters"`
}
SignatureHelpProvider represents the signature help provider capabilities.
type SignatureInformation ¶
type SignatureInformation struct {
Label string `json:"label"`
Documentation *MarkupContent `json:"documentation,omitempty"`
Parameters []ParameterInformation `json:"parameters,omitempty"`
}
SignatureInformation represents information about a function signature.
type TextDocument ¶
type TextDocument struct {
URI string `json:"uri"`
}
TextDocument represents a text document.
type TextDocumentIdentifier ¶
type TextDocumentIdentifier struct {
URI string `json:"uri"`
}
TextDocumentIdentifier represents a text document identifier.
type TextDocumentItem ¶
type TextDocumentItem struct {
LanguageID string `json:"languageId"`
Text string `json:"text"`
URI string `json:"uri"`
Version int `json:"version"`
}
TextDocumentItem represents a text document item.
type TextDocumentSync ¶
type TextDocumentSync struct {
OpenClose bool `json:"openClose"`
Change ChangeType `json:"change"`
}
TextDocumentSync represents the text document sync capabilities.