Documentation
¶
Index ¶
- type CallHierarchyIncomingCall
- type CallHierarchyIncomingCallsParams
- type CallHierarchyItem
- type CallHierarchyOutgoingCall
- type CallHierarchyOutgoingCallsParams
- type CallHierarchyPrepareParams
- type ClientCapabilities
- type DefinitionParams
- type Hover
- type HoverParams
- type ImplementationParams
- type InitializeParams
- type JSONRPCError
- type JSONRPCRequest
- type JSONRPCResponse
- type LSPClient
- type Location
- type Manager
- type MarkupContent
- type Position
- type Range
- type ReferenceContext
- type ReferenceParams
- type TextDocumentIdentifier
- type TextDocumentPositionParams
- type WorkspaceFolder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallHierarchyIncomingCall ¶
type CallHierarchyIncomingCall struct {
From CallHierarchyItem `json:"from"`
FromRanges []Range `json:"fromRanges"`
}
CallHierarchyIncomingCall represents an incoming call.
type CallHierarchyIncomingCallsParams ¶
type CallHierarchyIncomingCallsParams struct {
Item CallHierarchyItem `json:"item"`
}
CallHierarchyIncomingCallsParams represents parameters for callHierarchy/incomingCalls.
type CallHierarchyItem ¶
type CallHierarchyItem struct {
Name string `json:"name"`
Kind int `json:"kind"`
Tags []int `json:"tags,omitempty"`
Detail string `json:"detail,omitempty"`
URI string `json:"uri"`
Range Range `json:"range"`
SelectionRange Range `json:"selectionRange"`
Data interface{} `json:"data,omitempty"`
}
CallHierarchyItem represents an item in a call hierarchy.
type CallHierarchyOutgoingCall ¶
type CallHierarchyOutgoingCall struct {
To CallHierarchyItem `json:"to"`
FromRanges []Range `json:"fromRanges"`
}
CallHierarchyOutgoingCall represents an outgoing call.
type CallHierarchyOutgoingCallsParams ¶
type CallHierarchyOutgoingCallsParams struct {
Item CallHierarchyItem `json:"item"`
}
CallHierarchyOutgoingCallsParams represents parameters for callHierarchy/outgoingCalls.
type CallHierarchyPrepareParams ¶
type CallHierarchyPrepareParams struct {
TextDocumentPositionParams
}
CallHierarchyPrepareParams represents parameters for textDocument/prepareCallHierarchy.
type ClientCapabilities ¶
type ClientCapabilities struct {
TextDocument struct {
Definition struct {
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
} `json:"definition,omitempty"`
References struct {
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
} `json:"references,omitempty"`
Hover struct {
ContentFormat []string `json:"contentFormat,omitempty"`
} `json:"hover,omitempty"`
} `json:"textDocument,omitempty"`
}
ClientCapabilities represents the capabilities of the LSP client.
type DefinitionParams ¶
type DefinitionParams struct {
TextDocumentPositionParams
}
DefinitionParams represents parameters for the textDocument/definition request.
type Hover ¶
type Hover struct {
Contents MarkupContent `json:"contents"`
Range *Range `json:"range,omitempty"`
}
Hover represents the result of a hover request.
type HoverParams ¶
type HoverParams struct {
TextDocumentPositionParams
}
HoverParams represents parameters for the textDocument/hover request.
type ImplementationParams ¶
type ImplementationParams struct {
TextDocumentPositionParams
}
ImplementationParams represents parameters for the textDocument/implementation request.
type InitializeParams ¶
type InitializeParams struct {
ProcessID int `json:"processId"`
RootURI string `json:"rootUri,omitempty"`
Capabilities ClientCapabilities `json:"capabilities"`
WorkspaceFolders []WorkspaceFolder `json:"workspaceFolders,omitempty"`
}
InitializeParams represents parameters for the initialize request.
type JSONRPCError ¶
type JSONRPCError struct {
Code int `json:"code"`
Message string `json:"message"`
Data json.RawMessage `json:"data,omitempty"`
}
JSONRPCError represents a JSON-RPC 2.0 error.
type JSONRPCRequest ¶
type JSONRPCRequest struct {
JSONRPC string `json:"jsonrpc"`
ID interface{} `json:"id,omitempty"`
Method string `json:"method"`
Params json.RawMessage `json:"params,omitempty"`
}
JSONRPCRequest represents a JSON-RPC 2.0 request.
type JSONRPCResponse ¶
type JSONRPCResponse struct {
JSONRPC string `json:"jsonrpc"`
ID interface{} `json:"id"`
Result json.RawMessage `json:"result,omitempty"`
Error *JSONRPCError `json:"error,omitempty"`
}
JSONRPCResponse represents a JSON-RPC 2.0 response.
type LSPClient ¶
type LSPClient interface {
Definition(ctx context.Context, params DefinitionParams) ([]Location, error)
Implementation(ctx context.Context, params ImplementationParams) ([]Location, error)
References(ctx context.Context, params ReferenceParams) ([]Location, error)
Hover(ctx context.Context, params HoverParams) (*Hover, error)
// Call Hierarchy (Omniscience V2)
PrepareCallHierarchy(ctx context.Context, params CallHierarchyPrepareParams) ([]CallHierarchyItem, error)
IncomingCalls(ctx context.Context, params CallHierarchyIncomingCallsParams) ([]CallHierarchyIncomingCall, error)
OutgoingCalls(ctx context.Context, params CallHierarchyOutgoingCallsParams) ([]CallHierarchyOutgoingCall, error)
Close() error
}
LSPClient defines the interface for an LSP client.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func GetGlobalManager ¶
func GetGlobalManager() *Manager
func NewManager ¶
func NewManager() *Manager
type MarkupContent ¶
MarkupContent represents a markup content.
type Position ¶
type Position struct {
Line int `json:"line"` // 0-based
Character int `json:"character"` // 0-based
}
Position represents a symbol's position in a text document.
type ReferenceContext ¶
type ReferenceContext struct {
IncludeDeclaration bool `json:"includeDeclaration"`
}
ReferenceContext represents context for the textDocument/references request.
type ReferenceParams ¶
type ReferenceParams struct {
TextDocumentPositionParams
Context ReferenceContext `json:"context"`
}
ReferenceParams represents parameters for the textDocument/references request.
type TextDocumentIdentifier ¶
type TextDocumentIdentifier struct {
URI string `json:"uri"`
}
TextDocumentIdentifier represents a text document's URI.
type TextDocumentPositionParams ¶
type TextDocumentPositionParams struct {
TextDocument TextDocumentIdentifier `json:"textDocument"`
Position Position `json:"position"`
}
TextDocumentPositionParams represents parameters for requests at a position.
type WorkspaceFolder ¶
WorkspaceFolder represents a workspace folder in LSP.