Documentation ¶
Index ¶
- type ClientCapabilities
- type CodeAction
- type CodeActionContext
- type CodeActionKind
- type CodeActionParams
- type Command
- type CompletionContext
- type CompletionItem
- type CompletionItemKind
- type CompletionItemTag
- type CompletionParams
- type CompletionProvider
- type CompletionTriggerKind
- type Diagnostic
- type DiagnosticRelatedInformation
- type DidChangeConfigurationParams
- type DidChangeTextDocumentParams
- type DidChangeWorkspaceFoldersParams
- type DidCloseTextDocumentParams
- type DidOpenTextDocumentParams
- type DidSaveTextDocumentParams
- type DocumentDefinitionParams
- type DocumentFormattingParams
- type DocumentSymbol
- type DocumentSymbolParams
- type DocumentURI
- type ExecuteCommandParams
- type File
- type FormattingOptions
- type Hover
- type HoverParams
- type InitializeOptions
- type InitializeParams
- type InitializeResult
- type InsertTextFormat
- type LSPServer
- type Location
- type LogMessageParams
- type MarkedString
- type MessageType
- type NotificationMessage
- type Option
- type PartialResultParams
- type Position
- type PublishDiagnosticsParams
- type Range
- type ReferenceParams
- type ServerCapabilities
- type ServerCapabilitiesWorkspace
- type ShowMessageParams
- type SymbolInformation
- type TextDocumentContentChangeEvent
- type TextDocumentIdentifier
- type TextDocumentItem
- type TextDocumentPositionParams
- type TextDocumentSyncKind
- type TextEdit
- type VersionedTextDocumentIdentifier
- type WorkDoneProgressParams
- type WorkspaceEdit
- type WorkspaceFolder
- type WorkspaceFoldersChangeEvent
- type WorkspaceFoldersServerCapabilities
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientCapabilities ¶
type ClientCapabilities struct { }
type CodeAction ¶
type CodeAction struct { Title string `json:"title"` Diagnostics []Diagnostic `json:"diagnostics"` IsPreferred bool `json:"isPreferred"` Edit *WorkspaceEdit `json:"edit"` Command *Command `json:"command"` }
type CodeActionContext ¶
type CodeActionContext struct { Diagnostics []Diagnostic `json:"diagnostics"` Only []CodeActionKind `json:"only,omitempty"` }
type CodeActionKind ¶
type CodeActionKind string
const ( Empty CodeActionKind = "" QuickFix CodeActionKind = "quickfix" Refactor CodeActionKind = "refactor" RefactorExtract CodeActionKind = "refactor.extract" RefactorInline CodeActionKind = "refactor.inline" RefactorRewrite CodeActionKind = "refactor.rewrite" Source CodeActionKind = "source" SourceOrganizeImports CodeActionKind = "source.organizeImports" )
type CodeActionParams ¶
type CodeActionParams struct { WorkDoneProgressParams PartialResultParams TextDocument TextDocumentIdentifier `json:"textDocument"` Range Range `json:"range"` Context CodeActionContext `json:"context"` }
type CompletionContext ¶
type CompletionContext struct { TriggerKind CompletionTriggerKind `json:"triggerKind"` TriggerCharacter *string `json:"triggerCharacter"` }
type CompletionItem ¶
type CompletionItem struct { Label string `json:"label"` Kind CompletionItemKind `json:"kind,omitempty"` Tags []CompletionItemTag `json:"tags,omitempty"` Detail string `json:"detail,omitempty"` Documentation string `json:"documentation,omitempty"` // string | MarkupContent Deprecated bool `json:"deprecated,omitempty"` Preselect bool `json:"preselect,omitempty"` SortText string `json:"sortText,omitempty"` FilterText string `json:"filterText,omitempty"` InsertText string `json:"insertText,omitempty"` InsertTextFormat InsertTextFormat `json:"insertTextFormat,omitempty"` TextEdit *TextEdit `json:"textEdit,omitempty"` AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"` CommitCharacters []string `json:"commitCharacters,omitempty"` Command *Command `json:"command,omitempty"` Data interface{} `json:"data,omitempty"` }
type CompletionItemKind ¶
type CompletionItemKind int
const ( TextCompletion CompletionItemKind = 1 MethodCompletion CompletionItemKind = 2 FunctionCompletion CompletionItemKind = 3 ConstructorCompletion CompletionItemKind = 4 FieldCompletion CompletionItemKind = 5 VariableCompletion CompletionItemKind = 6 ClassCompletion CompletionItemKind = 7 InterfaceCompletion CompletionItemKind = 8 ModuleCompletion CompletionItemKind = 9 PropertyCompletion CompletionItemKind = 10 UnitCompletion CompletionItemKind = 11 ValueCompletion CompletionItemKind = 12 EnumCompletion CompletionItemKind = 13 KeywordCompletion CompletionItemKind = 14 SnippetCompletion CompletionItemKind = 15 ColorCompletion CompletionItemKind = 16 FileCompletion CompletionItemKind = 17 ReferenceCompletion CompletionItemKind = 18 FolderCompletion CompletionItemKind = 19 EnumMemberCompletion CompletionItemKind = 20 ConstantCompletion CompletionItemKind = 21 StructCompletion CompletionItemKind = 22 EventCompletion CompletionItemKind = 23 OperatorCompletion CompletionItemKind = 24 TypeParameterCompletion CompletionItemKind = 25 )
type CompletionItemTag ¶
type CompletionItemTag int
type CompletionParams ¶
type CompletionParams struct { TextDocumentPositionParams CompletionContext CompletionContext `json:"contentChanges"` }
type CompletionProvider ¶
type CompletionTriggerKind ¶
type CompletionTriggerKind int
const ( Invoked CompletionTriggerKind = 1 TriggerCharacter CompletionTriggerKind = 2 TriggerForIncompleteCompletions CompletionTriggerKind = 3 )
type Diagnostic ¶
type DidChangeConfigurationParams ¶
type DidChangeConfigurationParams struct {
Settings struct{} `json:"settings"`
}
type DidChangeTextDocumentParams ¶
type DidChangeTextDocumentParams struct { TextDocument VersionedTextDocumentIdentifier `json:"textDocument"` ContentChanges []TextDocumentContentChangeEvent `json:"contentChanges"` }
type DidChangeWorkspaceFoldersParams ¶
type DidChangeWorkspaceFoldersParams struct {
Event WorkspaceFoldersChangeEvent `json:"event"`
}
type DidCloseTextDocumentParams ¶
type DidCloseTextDocumentParams struct {
TextDocument TextDocumentIdentifier `json:"textDocument"`
}
type DidOpenTextDocumentParams ¶
type DidOpenTextDocumentParams struct {
TextDocument TextDocumentItem `json:"textDocument"`
}
type DidSaveTextDocumentParams ¶
type DidSaveTextDocumentParams struct { Text *string `json:"text"` TextDocument TextDocumentIdentifier `json:"textDocument"` }
type DocumentDefinitionParams ¶
type DocumentDefinitionParams struct { TextDocumentPositionParams WorkDoneProgressParams PartialResultParams }
type DocumentFormattingParams ¶
type DocumentFormattingParams struct { TextDocument TextDocumentIdentifier `json:"textDocument"` Options FormattingOptions `json:"options"` }
type DocumentSymbol ¶
type DocumentSymbolParams ¶
type DocumentSymbolParams struct {
TextDocument TextDocumentIdentifier `json:"textDocument"`
}
type DocumentURI ¶ added in v0.7.0
type DocumentURI string
type ExecuteCommandParams ¶
type ExecuteCommandParams struct { WorkDoneProgressParams Command string `json:"command"` Arguments []interface{} `json:"arguments,omitempty"` }
type FormattingOptions ¶
type FormattingOptions map[string]interface{}
type Hover ¶
type Hover struct { Contents interface{} `json:"contents"` Range *Range `json:"range"` }
type HoverParams ¶
type HoverParams struct {
TextDocumentPositionParams
}
type InitializeOptions ¶
type InitializeParams ¶
type InitializeParams struct { ProcessID int `json:"processId,omitempty"` RootURI string `json:"rootUri,omitempty"` InitializationOptions InitializeOptions `json:"initializationOptions,omitempty"` Capabilities ClientCapabilities `json:"capabilities,omitempty"` Trace string `json:"trace,omitempty"` }
type InitializeResult ¶
type InitializeResult struct {
Capabilities ServerCapabilities `json:"capabilities,omitempty"`
}
type InsertTextFormat ¶
type InsertTextFormat int
const ( PlainTextTextFormat InsertTextFormat = 1 SnippetTextFormat InsertTextFormat = 2 )
type LSPServer ¶
type LSPServer struct {
// contains filtered or unexported fields
}
func NewLSPServer ¶
type LogMessageParams ¶
type LogMessageParams struct { Type MessageType `json:"type"` Message string `json:"message"` }
type MarkedString ¶
type MessageType ¶
type MessageType int
const ( LogError MessageType = 1 LogWarning MessageType = 2 LogInfo MessageType = 3 LogLog MessageType = 4 )
type NotificationMessage ¶
type NotificationMessage struct { Method string `json:"message"` Params interface{} `json:"params"` }
type PartialResultParams ¶
type PartialResultParams struct {
PartialResultToken interface{} `json:"partialResultToken"`
}
type PublishDiagnosticsParams ¶
type PublishDiagnosticsParams struct { URI string `json:"uri"` Diagnostics []Diagnostic `json:"diagnostics"` Version int `json:"version"` }
type ReferenceParams ¶
type ReferenceParams struct { TextDocumentPositionParams WorkDoneProgressParams PartialResultParams }
type ServerCapabilities ¶
type ServerCapabilities struct { TextDocumentSync TextDocumentSyncKind `json:"textDocumentSync,omitempty"` DocumentSymbolProvider bool `json:"documentSymbolProvider,omitempty"` CompletionProvider *CompletionProvider `json:"completionProvider,omitempty"` DefinitionProvider bool `json:"definitionProvider,omitempty"` ReferencesProvider bool `json:"referencesProvider,omitempty"` DocumentFormattingProvider bool `json:"documentFormattingProvider,omitempty"` HoverProvider bool `json:"hoverProvider,omitempty"` CodeActionProvider bool `json:"codeActionProvider,omitempty"` Workspace *ServerCapabilitiesWorkspace `json:"workspace,omitempty"` }
type ServerCapabilitiesWorkspace ¶
type ServerCapabilitiesWorkspace struct {
WorkspaceFolders WorkspaceFoldersServerCapabilities `json:"workspaceFolders"`
}
type ShowMessageParams ¶
type ShowMessageParams struct { Type MessageType `json:"type"` Message string `json:"message"` }
type SymbolInformation ¶
type TextDocumentIdentifier ¶
type TextDocumentIdentifier struct {
URI string `json:"uri"`
}
type TextDocumentItem ¶
type TextDocumentPositionParams ¶
type TextDocumentPositionParams struct { TextDocument TextDocumentIdentifier `json:"textDocument"` Position Position `json:"position"` }
type TextDocumentSyncKind ¶
type TextDocumentSyncKind int
const ( TDSKNone TextDocumentSyncKind = 0 TDSKFull TextDocumentSyncKind = 1 TDSKIncremental TextDocumentSyncKind = 2 )
type VersionedTextDocumentIdentifier ¶
type VersionedTextDocumentIdentifier struct { TextDocumentIdentifier Version int `json:"version"` }
type WorkDoneProgressParams ¶
type WorkDoneProgressParams struct {
WorkDoneToken interface{} `json:"workDoneToken"`
}
type WorkspaceEdit ¶
type WorkspaceEdit struct { Changes interface{} `json:"changes"` DocumentChanges interface{} `json:"documentChanges"` }
type WorkspaceFolder ¶
type WorkspaceFoldersChangeEvent ¶
type WorkspaceFoldersChangeEvent struct { Added []WorkspaceFolder `json:"added,omitempty"` Removed []WorkspaceFolder `json:"removed,omitempty"` }
Click to show internal directories.
Click to hide internal directories.