Documentation ¶
Index ¶
- Constants
- type CapabilitiesSections
- type Capability
- type CompletionItem
- type ContentChange
- type DefinitionParams
- type Diagnostic
- type DidChangeWatchedFilesParams
- type FileEvent
- type InitializeParams
- type Location
- type Position
- type PublishDiagnosticsParams
- type Range
- type ReferencesParams
- type SymbolInformation
- type TextDocumentCapabilities
- type TextDocumentDidChangeParams
- type TextDocumentDidOpenParams
- type WorkspaceCapabilities
Constants ¶
View Source
const ( Created = 1 Changed = 2 Deleted = 3 )
View Source
const ( /** * Reports an error. */ Error = 1 /** * Reports a warning. */ Warning = 2 /** * Reports an information. */ Information = 3 /** * Reports a hint. */ Hint = 4 )
View Source
const ( CompletionKindText = 1 CompletionKindMethod = 2 CompletionKindFunction = 3 CompletionKindConstructor = 4 CompletionKindField = 5 CompletionKindVariable = 6 CompletionKindClass = 7 CompletionKindInterface = 8 CompletionKindModule = 9 CompletionKindProperty = 10 CompletionKindUnit = 11 CompletionKindValue = 12 CompletionKindEnum = 13 CompletionKindKeyword = 14 CompletionKindSnippet = 15 CompletionKindColor = 16 CompletionKindFile = 17 CompletionKindReference = 18 )
View Source
const ( SymbolKindFile = 1 SymbolKindModule = 2 SymbolKindNamespace = 3 SymbolKindPackage = 4 SymbolKindClass = 5 SymbolKindMethod = 6 SymbolKindProperty = 7 SymbolKindField = 8 SymbolKindConstructor = 9 SymbolKindEnum = 10 SymbolKindInterface = 11 SymbolKindFunction = 12 SymbolKindVariable = 13 SymbolKindConstant = 14 SymbolKindString = 15 SymbolKindNumber = 16 SymbolKindBoolean = 17 SymbolKindArray = 18 )
enum SymbolKind
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapabilitiesSections ¶
type CapabilitiesSections struct { Workspace WorkspaceCapabilities `json:"workspace"` TextDocument TextDocumentCapabilities `json:"textDocument"` }
type Capability ¶
type CompletionItem ¶
type CompletionItem struct { /** * The label of this completion item. By default * also the text that is inserted when selecting * this completion. */ Label string `json:"label"` /** * The kind of this completion item. Based of the kind * an icon is chosen by the editor. */ Kind int `json:"kind"` /** * A human-readable string with additional information * about this item, like type or symbol information. */ Detail string `json:"detail,omitempty"` /** * A human-readable string that represents a doc-comment. */ Documentation string `json:"documentation,omitempty"` /** * A string that shoud be used when comparing this item * with other items. When `falsy` the label is used. */ SortText string `json:"sortText,omitempty"` /** * A string that should be used when filtering a set of * completion items. When `falsy` the label is used. */ // filterText?: string; /** * A string that should be inserted a document when selecting * this completion. When `falsy` the label is used. */ InsertText string `json:"insertText,omitempty"` }
type ContentChange ¶
type ContentChange struct {
Text string `json:"text"`
}
type DefinitionParams ¶
type Diagnostic ¶
type Diagnostic struct { /** * The range at which the message applies */ Range Range `json:"range"` /** * The diagnostic's severity. Can be omitted. If omitted it is up to the * client to interpret diagnostics as error, warning, info or hint. */ Severity int `json:"severity,omitempty"` /** * The diagnostic's code. Can be omitted. */ Code string `json:"code,omitempty"` /** * A human-readable string describing the source of this * diagnostic, e.g. 'typescript' or 'super lint'. */ Source string `json:"source"` /** * The diagnostic's message. */ Message string `json:"message"` /* Experimental "tags" feature for marking unused variables */ Tags []int `json:"tags,omitempty"` }
type DidChangeWatchedFilesParams ¶
type DidChangeWatchedFilesParams struct {
Changes []FileEvent `json:"changes"`
}
type InitializeParams ¶
type InitializeParams struct { ProcessID int `json:"processId"` RootPath string `json:"rootPath"` RootURI string `json:"rootUri"` Capabilities CapabilitiesSections `json:"capabilities"` Trace string `json:"trace"` }
type PublishDiagnosticsParams ¶
type PublishDiagnosticsParams struct { /** * The URI for which diagnostic information is reported. */ URI string `json:"uri"` /** * An array of diagnostic information items. */ Diagnostics []Diagnostic `json:"diagnostics"` }
type ReferencesParams ¶
type SymbolInformation ¶
type SymbolInformation struct { /** * The name of this symbol. */ Name string `json:"name"` /** * The kind of this symbol. */ Kind int `json:"kind"` /** * The location of this symbol. */ Location Location `json:"location"` /** * The name of the symbol containing this symbol. */ ContainerName string `json:"containerName,omitempty"` }
type TextDocumentCapabilities ¶
type TextDocumentCapabilities struct { Synchronization Capability `json:"synchronization"` Completion Capability `json:"completion"` Hover Capability `json:"hover"` SignatureHelp Capability `json:"signatureHelp"` Definition Capability `json:"definition"` References Capability `json:"references"` DocumentHighlight Capability `json:"documentHighlight"` DocumentSymbol Capability `json:"documentSymbol"` CodeAction Capability `json:"codeAction"` CodeLens Capability `json:"codeLens"` Formatting Capability `json:"formatting"` RangeFormatting Capability `json:"rangeFormatting"` OnTypeFormatting Capability `json:"onTypeFormatting"` Rename Capability `json:"rename"` DocumentLink Capability `json:"documentLink"` }
type TextDocumentDidChangeParams ¶
type TextDocumentDidChangeParams struct { TextDocument struct { URI string `json:"uri"` Version int `json:"version"` } `json:"textDocument"` ContentChanges []ContentChange `json:"contentChanges"` }
type WorkspaceCapabilities ¶
type WorkspaceCapabilities struct { ApplyEdit bool DidChangeConfiguration Capability `json:"didChangeConfiguration"` DidChangeWatchedFiles Capability `json:"didChangeWatchedFiles"` Symbol Capability `json:"symbol"` ExecuteCommand Capability `json:"executeCommand"` }
Click to show internal directories.
Click to hide internal directories.