Documentation ¶
Index ¶
- Constants
- func BytesToPos(line string, i int) int
- func PosToBytes(line string, pos int) int
- type CompletionItem
- type CompletionItemKind
- type CompletionItemLabelDetails
- type CompletionParams
- type DefinitionParams
- type Diagnostic
- type DidChangeTextDocumentParams
- type DidOpenTextDocumentParams
- type Hover
- type HoverParams
- type InitializeParams
- type InitializeResult
- type Location
- type MarkupContent
- type Position
- type PublishDiagnosticParams
- type Range
- type TextDocumentContentChangeEvent
- type TextDocumentItem
- type TextDocumentPositionParams
- type TextEdit
Constants ¶
View Source
const ( DiagnosticError = 1 DiagnosticWarning = 2 DiagnosticInformation = 3 DiagnosticHint = 4 )
Variables ¶
This section is empty.
Functions ¶
func BytesToPos ¶
func PosToBytes ¶
Types ¶
type CompletionItem ¶
type CompletionItem struct { Label string `json:"label"` Detail string `json:"detail,omitempty"` LabelDetails *CompletionItemLabelDetails `json:"labelDetails,omitempty"` Kind CompletionItemKind `json:"kind"` Documentation *MarkupContent `json:"documentation,omitempty"` InsertText string `json:"insertText,omitempty"` AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"` IsType bool `json:"-"` }
type CompletionItemKind ¶
type CompletionItemKind int
const ( CompletionItemText CompletionItemKind = 1 CompletionItemMethod CompletionItemKind = 2 CompletionItemFunction CompletionItemKind = 3 CompletionItemConstructor CompletionItemKind = 4 CompletionItemField CompletionItemKind = 5 CompletionItemVariable CompletionItemKind = 6 CompletionItemClass CompletionItemKind = 7 CompletionItemInterface CompletionItemKind = 8 CompletionItemModule CompletionItemKind = 9 CompletionItemProperty CompletionItemKind = 10 CompletionItemUnit CompletionItemKind = 11 CompletionItemValue CompletionItemKind = 12 CompletionItemEnum CompletionItemKind = 13 CompletionItemKeyword CompletionItemKind = 14 CompletionItemSnippet CompletionItemKind = 15 CompletionItemColor CompletionItemKind = 16 CompletionItemFile CompletionItemKind = 17 CompletionItemReference CompletionItemKind = 18 CompletionItemFolder CompletionItemKind = 19 CompletionItemEnumMember CompletionItemKind = 20 CompletionItemConstant CompletionItemKind = 21 CompletionItemStruct CompletionItemKind = 22 CompletionItemEvent CompletionItemKind = 23 CompletionItemOperator CompletionItemKind = 24 CompletionItemTypeParameter CompletionItemKind = 25 )
type CompletionParams ¶
type CompletionParams struct{ TextDocumentPositionParams }
type DefinitionParams ¶
type DefinitionParams struct{ TextDocumentPositionParams }
type Diagnostic ¶
type DidChangeTextDocumentParams ¶
type DidChangeTextDocumentParams struct { TextDocument TextDocumentItem `json:"textDocument"` ContentChanges []TextDocumentContentChangeEvent `json:"contentChanges"` }
type DidOpenTextDocumentParams ¶
type DidOpenTextDocumentParams struct {
TextDocument TextDocumentItem `json:"textDocument"`
}
type Hover ¶
type Hover struct { Range Range `json:"range"` Contents MarkupContent `json:"contents"` }
type HoverParams ¶
type HoverParams struct{ TextDocumentPositionParams }
type InitializeParams ¶
type InitializeParams struct {
RootPath string `json:"rootPath"`
}
type InitializeResult ¶
type InitializeResult struct { Capabilities struct { TextDocumentSync int `json:"textDocumentSync"` CompletionProvider struct { TriggerCharacters []string `json:"triggerCharacters"` } `json:"completionProvider"` HoverProvider bool `json:"hoverProvider"` DefinitionProvider bool `json:"definitionProvider"` } `json:"capabilities"` }
type MarkupContent ¶
type PublishDiagnosticParams ¶
type PublishDiagnosticParams struct { URI string `json:"uri"` Version int `json:"version"` Diagnostics []Diagnostic `json:"diagnostics"` }
type TextDocumentItem ¶
Click to show internal directories.
Click to hide internal directories.