Documentation ¶
Index ¶
- func CalculatePos(fset *token.FileSet, path string, line int, char int) token.Pos
- func ParseDocumentUri(uri string) *url.URL
- func ParseMessage(buf []byte) (map[string]interface{}, bool)
- func ParseRequest(buf []byte, req interface{}) bool
- func ReadBuffer(reader *bufio.Reader) ([]byte, bool)
- func SendError(format string, args ...interface{})
- func SendErrors(errs []error)
- func SendMessage(res interface{}) bool
- type ClientCapabilities
- type CodeLens
- type CodeLensParams
- type CodeLensRequest
- type CodeLensResponse
- type Command
- type Diagnostic
- type InitializeParams
- type InitializeRequest
- type InitializeResponse
- type InitializeResult
- type Location
- type MarkupContent
- type Position
- type PublishDiagnosticsNotification
- type PublishDiagnosticsParams
- type Range
- type ServerCapabilities
- type ShutdownRequest
- type ShutdownResponse
- type TextDocumentIdentifier
- type TextDocumentNotification
- type TextDocumentParams
- type WorkspaceClientCapabilities
- type WorkspaceFoldersServerCapabilities
- type WorkspaceServerCapabilities
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculatePos ¶
line and char must be zero-based
func ParseDocumentUri ¶
func ParseMessage ¶
func ParseRequest ¶
func SendErrors ¶
func SendErrors(errs []error)
func SendMessage ¶
func SendMessage(res interface{}) bool
Types ¶
type ClientCapabilities ¶
type ClientCapabilities struct {
Workspace WorkspaceClientCapabilities `json:"workspace"`
}
type CodeLensParams ¶
type CodeLensParams struct {
TextDocument TextDocumentIdentifier `json:"textDocument"`
}
type CodeLensRequest ¶
type CodeLensRequest struct { Jsonrpc string `json:"jsonrpc"` Id int `json:"id"` Method string `json:"method"` Params CodeLensParams `json:"Params"` }
type CodeLensResponse ¶
type Diagnostic ¶
type InitializeParams ¶
type InitializeParams struct {
Capabilities ClientCapabilities `json:"capabilities"`
}
type InitializeRequest ¶
type InitializeRequest struct { Jsonrpc string `json:"jsonrpc"` Id int `json:"id"` Method string `json:"method"` Params InitializeParams `json:"params"` }
type InitializeResponse ¶
type InitializeResponse struct { Jsonrpc string `json:"jsonrpc"` Id int `json:"id"` Result *InitializeResult `json:"result"` }
type InitializeResult ¶
type InitializeResult struct {
Capabilities ServerCapabilities `json:"capabilities"`
}
type MarkupContent ¶
type PublishDiagnosticsNotification ¶
type PublishDiagnosticsNotification struct { Jsonrpc string `json:"jsonrpc"` Method string `json:"method"` Params PublishDiagnosticsParams `json:"params"` }
type PublishDiagnosticsParams ¶
type PublishDiagnosticsParams struct { Uri string `json:"uri"` Diagnostics []Diagnostic `json:"diagnostics"` }
type ServerCapabilities ¶
type ServerCapabilities struct { TextDocumentSync int `json:"textDocumentSync"` CodeLensProvider bool `json:"codeLensProvider"` Workspace WorkspaceServerCapabilities `json:"workspace"` }
type ShutdownRequest ¶
type ShutdownResponse ¶
type TextDocumentIdentifier ¶
type TextDocumentIdentifier struct {
Uri string `json:"uri"`
}
type TextDocumentNotification ¶ added in v0.1.6
type TextDocumentNotification struct { Jsonrpc string `json:"jsonrpc"` Method string `json:"method"` Params TextDocumentParams `json:"params"` }
type TextDocumentParams ¶ added in v0.1.6
type TextDocumentParams struct {
TextDocument TextDocumentIdentifier `json:"textDocument"`
}
type WorkspaceClientCapabilities ¶
type WorkspaceClientCapabilities struct {
WorkspaceFolders bool `json:"workspaceFolders"`
}
type WorkspaceFoldersServerCapabilities ¶
type WorkspaceFoldersServerCapabilities struct {
Supported bool `json:"supported"`
}
type WorkspaceServerCapabilities ¶
type WorkspaceServerCapabilities struct {
WorkspaceFolders WorkspaceFoldersServerCapabilities `json:"workspaceFolders"`
}
Click to show internal directories.
Click to hide internal directories.