lsp

package module
v0.0.0-...-8f76e91 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2020 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

lsp: Language Server Protocol 3.X implementation for Go

GoDoc

Package lsp privides a Go implementation of Language Server Protocol.

Documentation

Index

Constants

View Source
const (
	ErrorCodeParseError           = jsonrpc2.CodeParseError
	ErrorCodeInvalidRequest       = jsonrpc2.CodeInvalidRequest
	ErrorCodeMethodNotFound       = jsonrpc2.CodeMethodNotFound
	ErrorCodeInvalidParams        = jsonrpc2.CodeInvalidParams
	ErrorCodeInternalError        = jsonrpc2.CodeInternalError
	ErrorCodeServerNotInitialized = -32002
	ErrorCodeUnknownErrorCode     = -32001
	ErrorCodeRequestCancelled     = -32800
	ErrorCodeContentModified      = -32801
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelParams

type CancelParams struct {
	ID jsonrpc2.ID `json:"id,omitempty"`
}

type ClientCapabilities

type ClientCapabilities struct {
	Workspace    *WorkspaceClientCapabilities    `json:"workspace,omitempty"`
	TextDocument *TextDocumentClientCapabilities `json:"textDocument,omitempty"`
	Window       *WindowClientCapabilities       `json:"window,omitempty"`
	Experimental interface{}                     `json:"experimental,omitempty"`
}

type ClientInfo

type ClientInfo struct {
	Name    string `json:"name"`
	Version string `json:"version,omitempty"`
}

type CodeAction

type CodeAction struct {
	Title       string         `json:"title"`
	Kind        CodeActionKind `json:"kind,omitempty"`
	Diagnostics []Diagnostic   `json:"diagnostics,omitempty"`
	IsPreferred bool           `json:"isPreferred,omitempty"`
	Edit        *WorkspaceEdit `json:"edit,omitempty"`
	Command     *Command       `json:"command,omitempty"`
}

type CodeActionClientCapabilities

type CodeActionClientCapabilities struct {
	DynamicRegistration      bool `json:"dynamicRegistration,omitempty"`
	CodeActionLiteralSupport *struct {
		CodeActionKind *struct {
			ValueSet []CodeActionKind `json:"valueSet,omitempty"`
		} `json:"codeActionKind,omitempty"`
	} `json:"codeActionLiteralSupport,omitempty"`
	IsPreferredSupport bool `json:"isPreferredSupport,omitempty"`
}

type CodeActionContext

type CodeActionContext struct {
	Diagnostics []Diagnostic     `json:"diagnostics"`
	Only        []CodeActionKind `json:"only,omitempty"`
}

type CodeActionKind

type CodeActionKind string
const (
	CodeActionKindEmpty                 CodeActionKind = ""
	CodeActionKindQuickFix              CodeActionKind = "quickfix"
	CodeActionKindRefactor              CodeActionKind = "refactor"
	CodeActionKindRefactorExtract       CodeActionKind = "refactor.extract"
	CodeActionKindRefactorInline        CodeActionKind = "refactor.inline"
	CodeActionKindRefactorRewirte       CodeActionKind = "refactor.rewrite"
	CodeActionKindSource                CodeActionKind = "source"
	CodeActionKindSourceOrganizeImports CodeActionKind = "source.organizeImports"
)

type CodeActionOptions

type CodeActionOptions struct {
	WorkDoneProgressOptions
	CodeActionKinds []CodeActionKind `json:"codeActionKinds,omitempty"`
}

type CodeActionParams

type CodeActionParams struct {
	WorkDoneProgressParams
	PartialResultParams
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Range        Range                  `json:"range"`
	Context      CodeActionContext      `json:"context"`
}

type CodeActionRegistrationOptions

type CodeActionRegistrationOptions struct {
	TextDocumentRegistrationOptions
	CodeActionOptions
}

type CodeLens

type CodeLens struct {
	Range   Range       `json:"range"`
	Command *Command    `json:"command,omitempty"`
	Data    interface{} `json:"data,omitempty"`
}

type CodeLensClientCapabilities

type CodeLensClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}

type CodeLensOptions

type CodeLensOptions struct {
	WorkDoneProgressOptions
	ResolveProvider bool `json:"resolveProvider,omitempty"`
}

type CodeLensParams

type CodeLensParams struct {
	WorkDoneProgressParams
	PartialResultParams
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

type CodeLensRegistrationOptions

type CodeLensRegistrationOptions struct {
	TextDocumentRegistrationOptions
	CodeLensOptions
}

type Color

type Color struct {
	Red   float64 `json:"red"`
	Green float64 `json:"green"`
	Blue  float64 `json:"blue"`
	Alpha float64 `json:"alpha"`
}

type ColorInformation

type ColorInformation struct {
	Range Range `json:"range"`
	Color Color `json:"color"`
}

type ColorPresentation

type ColorPresentation struct {
	Label               string     `json:"label"`
	TextEdit            *TextEdit  `json:"textEdit,omitempty"`
	AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"`
}

type ColorPresentationParams

type ColorPresentationParams struct {
	WorkDoneProgressParams
	PartialResultParams
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Color        Color                  `json:"color"`
	Range        Range                  `json:"range"`
}

type Command

type Command struct {
	Title     string        `json:"title"`
	Command   string        `json:"command"`
	Arguments []interface{} `json:"arguments,omitempty"`
}

type CompletionClientCapabilities

type CompletionClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
	CompletionItem      *struct {
		SnippetSupport          bool         `json:"snippetSupport,omitempty"`
		CommitCharactersSupport bool         `json:"commitCharactersSupport,omitempty"`
		DocumentationFormat     []MarkupKind `json:"documentationFormat,omitempty"`
		DeprecatedSupport       bool         `json:"deprecatedSupport,omitempty"`
		PreselectSupport        bool         `json:"preselectSupport,omitempty"`
		TagSupport              *struct {
			ValueSet []CompletionItemTag `json:"valueSet,omitempty"`
		} `json:"tagSupport,omitempty"`
	} `json:"completionItem,omitempty"`
	CompletionItemKind *struct {
		ValueSet []CompletionItemKind `json:"valueSet,omitempty"`
	} `json:"completionItemKind,omitempty"`
	ContextSupport bool `json:"contextSupport,omitempty"`
}

type CompletionContext

type CompletionContext struct {
	TriggerKind      CompletionTriggerKind `json:"triggerKind"`
	TriggerCharacter string                `json:"triggerCharacter,omitempty"`
}

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       interface{}         `json:"documentation,omitempty"` // string | MarkupContent
	Deprecated          bool                `json:"deprecated,omitempty"`    // deprecated
	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 (
	CompletionItemKindUnknown CompletionItemKind = iota
	CompletionItemKindText
	CompletionItemKindMethod
	CompletionItemKindFunction
	CompletionItemKindConstructor
	CompletionItemKindField
	CompletionItemKindVariable
	CompletionItemKindClass
	CompletionItemKindInterface
	CompletionItemKindModule
	CompletionItemKindProperty
	CompletionItemKindUnit
	CompletionItemKindValue
	CompletionItemKindEnum
	CompletionItemKindKeyword
	CompletionItemKindSnippet
	CompletionItemKindColor
	CompletionItemKindFile
	CompletionItemKindReference
	CompletionItemKindFolder
	CompletionItemKindEnumMember
	CompletionItemKindConstant
	CompletionItemKindStruct
	CompletionItemKindEvent
	CompletionItemKindOperator
	CompletionItemKindTypeParameter
)

type CompletionItemTag

type CompletionItemTag int
const (
	CompletionItemTagUnknown CompletionItemTag = iota
	CompletionItemTagDeprecated
)

type CompletionList

type CompletionList struct {
	IsIncomplete bool             `json:"isIncomplete"`
	Items        []CompletionItem `json:"items"`
}

type CompletionOptions

type CompletionOptions struct {
	WorkDoneProgressOptions
	TriggerCharacters   []string `json:"triggerCharacters,omitempty"`
	AllCommitCharacters []string `json:"allCommitCharacters,omitempty"`
	ResolveProvider     bool     `json:"resolveProvider,omitempty"`
}

type CompletionParams

type CompletionParams struct {
	TextDocumentPositionParams
	WorkDoneProgressParams
	PartialResultParams
	Context *CompletionContext `json:"context,omitempty"`
}

type CompletionRegistrationOptions

type CompletionRegistrationOptions struct {
	TextDocumentRegistrationOptions
	CompletionOptions
}

type CompletionTriggerKind

type CompletionTriggerKind int
const (
	CompletionTriggerKindUnknown CompletionTriggerKind = iota
	CompletionTriggerKindInvoked
	CompletionTriggerKindTriggerCharacter
	CompletionTriggerKindTriggerForIncompleteCompletions
)

type ConfigurationItem

type ConfigurationItem struct {
	ScopeURI DocumentURI `json:"scopeUri,omitempty"`
	Section  string      `json:"section,omitempty"`
}

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func (*Conn) Configuration

func (c *Conn) Configuration(ctx context.Context, items []ConfigurationItem) ([]interface{}, error)

func (*Conn) LogMessage

func (c *Conn) LogMessage(ctx context.Context, typ MessageType, msg string) error

func (*Conn) RegisterCapability

func (c *Conn) RegisterCapability(ctx context.Context, regs []Registration) error

func (*Conn) ShowMessage

func (c *Conn) ShowMessage(ctx context.Context, typ MessageType, msg string) error

func (*Conn) ShowMessageRequest

func (c *Conn) ShowMessageRequest(
	ctx context.Context,
	typ MessageType,
	msg string,
	acts []MessageActionItem,
) ([]MessageActionItem, error)

func (*Conn) Telemetry

func (c *Conn) Telemetry(ctx context.Context, param interface{}) error

func (*Conn) UnregisterCapability

func (c *Conn) UnregisterCapability(ctx context.Context, unregs []Unregistration) error

func (*Conn) WorkDoneProgressCreate

func (c *Conn) WorkDoneProgressCreate(ctx context.Context, token ProgressToken) error

func (*Conn) WorkspaceFolders

func (c *Conn) WorkspaceFolders(ctx context.Context) ([]WorkspaceFolder, error)

type CreateFile

type CreateFile struct {
	Kind    string             `json:"kind"`
	URI     DocumentURI        `json:"uri"`
	Options *CreateFileOptions `json:"options,omitempty"`
}

func (*CreateFile) MarshalJSON

func (v *CreateFile) MarshalJSON() ([]byte, error)

func (*CreateFile) UnmarshalJSON

func (v *CreateFile) UnmarshalJSON(d []byte) error

type CreateFileOptions

type CreateFileOptions struct {
	Overwrite      bool `json:"overwrite,omitempty"`
	IgnoreIfExists bool `json:"ignoreIfExists,omitempty"`
}

type DeclarationClientCapabilities

type DeclarationClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
	LinkSupport         bool `json:"linkSupport,omitempty"`
}

type DeclarationOptions

type DeclarationOptions struct {
	WorkDoneProgressOptions
}

type DefinitionClientCapabilities

type DefinitionClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
	LinkSupport         bool `json:"linkSupport,omitempty"`
}

type DefinitionOptions

type DefinitionOptions struct {
	WorkDoneProgressOptions
}

type DefinitionRegistrationOptions

type DefinitionRegistrationOptions struct {
	TextDocumentRegistrationOptions
	DefinitionOptions
}

type DeleteFile

type DeleteFile struct {
	Kind    string             `json:"kind"`
	URI     DocumentURI        `json:"uri"`
	Options *DeleteFileOptions `json:"options,omitempty"`
}

func (*DeleteFile) MarshalJSON

func (v *DeleteFile) MarshalJSON() ([]byte, error)

func (*DeleteFile) UnmarshalJSON

func (v *DeleteFile) UnmarshalJSON(d []byte) error

type DeleteFileOptions

type DeleteFileOptions struct {
	Recursive         bool `json:"recursive,omitempty"`
	IgnoreIfNotExists bool `json:"ignoreIfNotExists,omitempty"`
}

type Diagnostic

type Diagnostic struct {
	Range              Range                          `json:"range"`
	Severity           DiagnosticSeverity             `json:"severity,omitempty"`
	Code               *IntOrString                   `json:"code,omitempty"`
	Source             string                         `json:"source,omitempty"`
	Message            string                         `json:"message"`
	Tags               []DiagnosticTag                `json:"tags,omitempty"`
	RelatedInformation []DiagnosticRelatedInformation `json:"relatedInformation,omitempty"`
}

type DiagnosticRelatedInformation

type DiagnosticRelatedInformation struct {
	Location Location `json:"location"`
	Message  string   `json:"message"`
}

type DiagnosticSeverity

type DiagnosticSeverity int
const (
	DiagnosticSeverityUnknown DiagnosticSeverity = iota
	DiagnosticSeverityError
	DiagnosticSeverityWarning
	DiagnosticSeverityInformation
	DiagnosticSeverityHint
)

type DiagnosticTag

type DiagnosticTag int
const (
	DiagnosticTagUnknown DiagnosticTag = iota
	DiagnosticTagUnnecessary
	DiagnosticTagDeprecated
)

type DidChangeConfigurationClientCapabilities

type DidChangeConfigurationClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}

type DidChangeConfigurationParams

type DidChangeConfigurationParams struct {
	Settings interface{} `json:"settings"`
}

type DidChangeTextDocumentParams

type DidChangeTextDocumentParams struct {
	TextDocument   VersionedTextDocumentIdentifier  `json:"textDocument"`
	ContentChanges []TextDocumentContentChangeEvent `json:"contentChanges"`
}

type DidChangeWatchedFilesClientCapabilities

type DidChangeWatchedFilesClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}

type DidChangeWatchedFilesParams

type DidChangeWatchedFilesParams struct {
	Changes []FileEvent `json:"changes"`
}

type DidChangeWatchedFilesRegistrationOptions

type DidChangeWatchedFilesRegistrationOptions struct {
	Watchers []FileSystemWatcher `json:"watchers,omitempty"`
}

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 {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Text         string                 `json:"text,omitempty"`
}

type DocumentChanges

type DocumentChanges struct {
	TextDocumentEdits []TextDocumentEdit
	CreateFiles       []CreateFile
	RenameFiles       []RenameFile
	DeleteFiles       []DeleteFile
}

func (*DocumentChanges) MarshalJSON

func (v *DocumentChanges) MarshalJSON() ([]byte, error)

func (*DocumentChanges) UnmarshalJSON

func (v *DocumentChanges) UnmarshalJSON(b []byte) error

type DocumentColorClientCapabilities

type DocumentColorClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}

type DocumentColorOptions

type DocumentColorOptions struct {
	WorkDoneProgressOptions
}

type DocumentColorParams

type DocumentColorParams struct {
	WorkDoneProgressParams
	PartialResultParams
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

type DocumentFilter

type DocumentFilter struct {
	Language string `json:"language,omitempty"`
	Scheme   string `json:"scheme,omitempty"`
	Pattern  string `json:"pattern,omitempty"`
}

type DocumentFormattingClientCapabilities

type DocumentFormattingClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}

type DocumentFormattingOptions

type DocumentFormattingOptions struct {
	WorkDoneProgressOptions
}

type DocumentFormattingParams

type DocumentFormattingParams struct {
	WorkDoneProgressParams
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Options      FormattingOptions      `json:"options"`
}

type DocumentFormattingRegistrationOptions

type DocumentFormattingRegistrationOptions struct {
	TextDocumentRegistrationOptions
	DocumentFormattingOptions
}

type DocumentHighlight

type DocumentHighlight struct {
	Range Range                 `json:"range"`
	Kind  DocumentHighlightKind `json:"kind"`
}

type DocumentHighlightClientCapabilities

type DocumentHighlightClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}

type DocumentHighlightKind

type DocumentHighlightKind int
const (
	DocumentHighlightKindUnknown DocumentHighlightKind = iota
	DocumentHighlightKindText
	DocumentHighlightKindRead
	DocumentHighlightKindWrite
)

type DocumentHighlightOptions

type DocumentHighlightOptions struct {
	WorkDoneProgressOptions
}

type DocumentHighlightRegistrationOptions

type DocumentHighlightRegistrationOptions struct {
	TextDocumentRegistrationOptions
	DocumentHighlightOptions
}
type DocumentLink struct {
	Range   Range       `json:"range"`
	Target  DocumentURI `json:"target,omitempty"`
	Tooltip string      `json:"tooltip,omitempty"`
	Data    interface{} `json:"data,omitempty"`
}

type DocumentLinkClientCapabilities

type DocumentLinkClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
	TooltipSupport      bool `json:"tooltipSupport,omitempty"`
}

type DocumentLinkOptions

type DocumentLinkOptions struct {
	WorkDoneProgressOptions
	ResolveProvider bool `json:"resolveProvider,omitempty"`
}

type DocumentLinkParams

type DocumentLinkParams struct {
	WorkDoneProgressParams
	PartialResultParams
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

type DocumentLinkRegistrationOptions

type DocumentLinkRegistrationOptions struct {
	TextDocumentRegistrationOptions
	DocumentLinkOptions
}

type DocumentOnTypeFormattingClientCapabilites

type DocumentOnTypeFormattingClientCapabilites struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}

type DocumentOnTypeFormattingOptions

type DocumentOnTypeFormattingOptions struct {
	FirstTriggerCharacter string   `json:"firstTriggerCharacter,omitempty"`
	MoreTriggerCharacter  []string `json:"moreTriggerCharacter,omitempty"`
}

type DocumentOnTypeFormattingParams

type DocumentOnTypeFormattingParams struct {
	TextDocumentPositionParams
	Ch      string            `json:"ch"`
	Options FormattingOptions `json:"options"`
}

type DocumentRangeFormattingClientCapabilities

type DocumentRangeFormattingClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}

type DocumentRangeFormattingOptions

type DocumentRangeFormattingOptions struct {
	WorkDoneProgressOptions
}

type DocumentRangeFormattingParams

type DocumentRangeFormattingParams struct {
	WorkDoneProgressParams
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Range        Range                  `json:"range"`
	Options      FormattingOptions      `json:"options"`
}

type DocumentSelector

type DocumentSelector []DocumentFilter

type DocumentSymbol

type DocumentSymbol struct {
	Name           string           `json:"name"`
	Detail         string           `json:"detail,omitempty"`
	Kind           SymbolKind       `json:"kind"`
	Deprecated     bool             `json:"deprecated,omitempty"`
	Range          Range            `json:"range"`
	SelectionRange Range            `json:"selectionRange"`
	Children       []DocumentSymbol `json:"children,omitempty"`
}

type DocumentSymbolClientCapabilities

type DocumentSymbolClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
	SymbolKind          *struct {
		ValueSet []SymbolKind `json:"valueSet,omitempty"`
	} `json:"symbolKind,omitempty"`
	HierarchicalDocumentSymbolSupport bool `json:"hierarchicalDocumentSymbolSupport,omitempty"`
}

type DocumentSymbolOptions

type DocumentSymbolOptions struct {
	WorkDoneProgressOptions
}

type DocumentSymbolParams

type DocumentSymbolParams struct {
	WorkDoneProgressParams
	PartialResultParams
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

type DocumentSymbolRegistrationOptions

type DocumentSymbolRegistrationOptions struct {
	TextDocumentRegistrationOptions
	DocumentSymbolOptions
}

type DocumentURI

type DocumentURI string

type ErrorCode

type ErrorCode int

type ExecuteCommandClientCapabilities

type ExecuteCommandClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}

type ExecuteCommandOptions

type ExecuteCommandOptions struct {
	WorkDoneProgressOptions
	Commands []string `json:"commands,omitempty"`
}

type ExecuteCommandParams

type ExecuteCommandParams struct {
	WorkDoneProgressParams
	Command   string        `json:"command"`
	Arguments []interface{} `json:"arguments,omitempty"`
}

type ExecuteCommandRegistrationOptions

type ExecuteCommandRegistrationOptions struct {
	ExecuteCommandOptions
}

type FailureHandlingKind

type FailureHandlingKind string
const (
	FailureHandlingKindAbort                 FailureHandlingKind = "abort"
	FailureHandlingKindTransactional         FailureHandlingKind = "transactional"
	FailureHandlingKindTextOnlyTransactional FailureHandlingKind = "textOnlyTransactional"
	FailureHandlingKindUndo                  FailureHandlingKind = "undo"
)

type FileChangeType

type FileChangeType int
const (
	FileChangeTypeUnknown FileChangeType = iota
	FileChangeTypeCreated
	FileChangeTypeChanged
	FileChangeTypeDeleted
)

type FileEvent

type FileEvent struct {
	URI  DocumentURI    `json:"uri"`
	Type FileChangeType `json:"type"`
}

type FileSystemWatcher

type FileSystemWatcher struct {
	GlobPattern string    `json:"globPattern"`
	Kind        WatchKind `json:"kind,omitempty"`
}

type FoldingRange

type FoldingRange struct {
	StartLine      int              `json:"startLine"`
	StartCharacter int              `json:"startCharacter,omitempty"`
	EndLine        int              `json:"endLine"`
	EndCharacter   int              `json:"endCharacter,omitempty"`
	Kind           FoldingRangeKind `json:"kind,omitempty"`
}

type FoldingRangeClientCapabilites

type FoldingRangeClientCapabilites struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
	RangeLimit          int  `json:"rangeLimit,omitempty"`
	LineFoldingOnly     bool `json:"lineFoldingOnly,omitempty"`
}

type FoldingRangeKind

type FoldingRangeKind string
const (
	FoldingRangeKindComment FoldingRangeKind = "comment"
	FoldingRangeKindImports FoldingRangeKind = "imports"
	FoldingRangeKindRegion  FoldingRangeKind = "region"
)

type FoldingRangeOptions

type FoldingRangeOptions struct {
	WorkDoneProgressOptions
}

type FoldingRangeParams

type FoldingRangeParams struct {
	WorkDoneProgressParams
	PartialResultParams
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

type FormattingOptions

type FormattingOptions struct {
	TabSize                int  `json:"tabSize"`
	InsertSpaces           bool `json:"insertSpaces"`
	TrimTrailingWhitespace bool `json:"trimTrailingWhitespace,omitempty"`
	InsertFinalNewline     bool `json:"insertFinalNewline,omitempty"`
	TrimFinalNewlines      bool `json:"trimFinalNewlines,omitempty"`
}

type Hover

type Hover struct {
	Contents MarkupContent `json:"contents"`
	Range    Range         `json:"range"`
}

type HoverClientCapabilities

type HoverClientCapabilities struct {
	DynamicRegistration bool         `json:"dynamicRegistration,omitempty"`
	ContentFormat       []MarkupKind `json:"contentFormat,omitempty"`
}

type HoverOptions

type HoverOptions struct {
	WorkDoneProgressOptions
}

type HoverRegistrationOptions

type HoverRegistrationOptions struct {
	TextDocumentRegistrationOptions
	HoverOptions
}

type ImplementationClientCapabilities

type ImplementationClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
	LinkSupport         bool `json:"linkSupport,omitempty"`
}

type ImplementationOptions

type ImplementationOptions struct {
	WorkDoneProgressOptions
}

type InitializeParams

type InitializeParams struct {
	ProcessID             *int               `json:"processId"`
	ClientInfo            *ClientInfo        `json:"clientInfo,omitempty"`
	RootPath              *string            `json:"rootPath,omitempty"`
	RootURI               *string            `json:"rootUri"`
	InitializationOptions interface{}        `json:"initializationOptions,omitempty"`
	Capabilities          ClientCapabilities `json:"capabilities"`
	Trace                 TraceConfig        `json:"trace,omitempty"`
	WorkspaceFolders      []WorkspaceFolder  `json:"workspaceFolders,omitempty"`
}

type InitializeResult

type InitializeResult struct {
	Capabilities ServerCapabilities `json:"capabilities"`
	ServerInfo   *ServerInfo        `json:"serverInfo,omitempty"`
}

type InsertTextFormat

type InsertTextFormat int
const (
	InsertTextFormatUnknown InsertTextFormat = iota
	InsertTextFormatPlainText
	InsertTextFormatSnippet
)

type IntOrString

type IntOrString struct {
	// contains filtered or unexported fields
}

func NewInt

func NewInt(v int) IntOrString

func NewString

func NewString(v string) IntOrString

func (*IntOrString) MarshalJSON

func (v *IntOrString) MarshalJSON() ([]byte, error)

func (*IntOrString) UnmarshalJSON

func (v *IntOrString) UnmarshalJSON(d []byte) error

type Location

type Location struct {
	URI   DocumentURI `json:"uri"`
	Range Range       `json:"range"`
}
type LocationLink struct {
	OriginSelectionRange *Range      `json:"originSelectionRange,omitempty"`
	TargetURI            DocumentURI `json:"targetUri"`
	TargetRange          Range       `json:"targetRange"`
	TargetSelectionRange Range       `json:"targetSelectionRange"`
}

type MarkupContent

type MarkupContent struct {
	Kind  MarkupKind `json:"kind"`
	Value string     `json:"value"`
}

type MarkupKind

type MarkupKind string
const (
	MarkupKindPlainText MarkupKind = "plaintext"
	MarkupKindMarkdown  MarkupKind = "markdown"
)

type MessageActionItem

type MessageActionItem struct {
	Title string `json:"title"`
}

type MessageType

type MessageType int
const (
	MessageTypeUnknown MessageType = iota
	MessageTypeError
	MessageTypeWarning
	MessageTypeInfo
	MessageTypeLog
)

type ParameterInformation

type ParameterInformation struct {
	Label         interface{} `json:"label"`                   // string | [number, number]
	Documentation interface{} `json:"documentation,omitempty"` // string | MarkupContent
}

type PartialResultParams

type PartialResultParams struct {
	PartialResultToken *ProgressToken `json:"partialResultToken,omitempty"`
}

type Position

type Position struct {
	Line      int `json:"line"`
	Character int `json:"character"`
}

type ProgressParams

type ProgressParams struct {
	Token ProgressToken `json:"token"`
	Value interface{}   `json:"value"`
}

type ProgressToken

type ProgressToken IntOrString

func NewIntToken

func NewIntToken(v int) ProgressToken

func NewStringToken

func NewStringToken(v string) ProgressToken

func (*ProgressToken) MarshalJSON

func (v *ProgressToken) MarshalJSON() ([]byte, error)

func (*ProgressToken) UnmarshalJSON

func (v *ProgressToken) UnmarshalJSON(d []byte) error

type PublishDiagnosticsClientCapabilities

type PublishDiagnosticsClientCapabilities struct {
	RelatedInformation bool `json:"relatedInformation,omitempty"`
	TagSupport         *struct {
		ValueSet []DiagnosticTag `json:"valueSet,omitempty"`
	} `json:"tagSupport,omitempty"`
	VersionSupport bool `json:"versionSupport,omitempty"`
}

type Range

type Range struct {
	Start Position `json:"start"`
	End   Position `json:"end"`
}

type ReferenceClientCapabilities

type ReferenceClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}

type ReferenceContext

type ReferenceContext struct {
	IncludeDeclaration bool `json:"includeDeclaration"`
}

type ReferenceOptions

type ReferenceOptions struct {
	WorkDoneProgressOptions
}

type ReferenceParams

type ReferenceParams struct {
	TextDocumentPositionParams
	WorkDoneProgressParams
	PartialResultParams
	Context ReferenceContext `json:"context"`
}

type ReferenceRegistrationOptions

type ReferenceRegistrationOptions struct {
	TextDocumentRegistrationOptions
	ReferenceOptions
}

type Registration

type Registration struct {
	ID             string      `json:"id"`
	Method         string      `json:"method"`
	RegisterOption interface{} `json:"registerOption,omitempty"`
}

type RenameClientCapabilities

type RenameClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
	PrepareSupport      bool `json:"prepareSupport,omitempty"`
}

type RenameFile

type RenameFile struct {
	Kind    string             `json:"kind"`
	OldURI  DocumentURI        `json:"oldUri"`
	NewURI  DocumentURI        `json:"newUri"`
	Options *RenameFileOptions `json:"options,omitempty"`
}

func (*RenameFile) MarshalJSON

func (v *RenameFile) MarshalJSON() ([]byte, error)

func (*RenameFile) UnmarshalJSON

func (v *RenameFile) UnmarshalJSON(d []byte) error

type RenameFileOptions

type RenameFileOptions struct {
	Overwrite      bool `json:"overwrite,omitempty"`
	IgnoreIfExists bool `json:"ignoreIfExists,omitempty"`
}

type RenameOptions

type RenameOptions struct {
	WorkDoneProgressOptions
	PrepareProvider bool `json:"prepareProvider,omitempty"`
}

type RenameParams

type RenameParams struct {
	TextDocumentPositionParams
	WorkDoneProgressParams
	NewName string `json:"newName"`
}

type RenameRegistrationOptions

type RenameRegistrationOptions struct {
	TextDocumentRegistrationOptions
	RenameOptions
}

type ResourceOperationKind

type ResourceOperationKind string
const (
	ResourceOperationKindCreate ResourceOperationKind = "create"
	ResourceOperationKindRename ResourceOperationKind = "rename"
	ResourceOperationKindDelete ResourceOperationKind = "delete"
)

type SelectionRange

type SelectionRange struct {
	Range  Range           `json:"range"`
	Parent *SelectionRange `json:"parent,omitempty"`
}

type SelectionRangeClientCapabilities

type SelectionRangeClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}

type SelectionRangeParams

type SelectionRangeParams struct {
	WorkDoneProgressParams
	PartialResultParams
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Positions    []Position             `json:"positions"`
}

type Server

type Server struct {
	Info         ServerInfo
	Capabilities ServerCapabilities

	OnProgress                      func(context.Context, *Conn, ProgressParams) error
	OnInitialize                    func(context.Context, *Conn, InitializeParams) (InitializeResult, error)
	OnInitialized                   func(context.Context, *Conn) error
	OnShutdown                      func(context.Context, *Conn) error
	OnDidChangeWorkspaceFolders     func(context.Context, *Conn, DidChangeWorkspaceFoldersParams) error
	OnDidChangeConfiguration        func(context.Context, *Conn, DidChangeConfigurationParams) error
	OnDidChangeWatchedFiles         func(context.Context, *Conn, DidChangeWatchedFilesParams) error
	OnWorkspaceSymbol               func(context.Context, *Conn, WorkspaceSymbolParams) ([]SymbolInformation, error)
	OnExecuteCommand                func(context.Context, *Conn, ExecuteCommandParams) (interface{}, error)
	OnDidOpenTextDocument           func(context.Context, *Conn, DidOpenTextDocumentParams) error
	OnDidChangeTextDocument         func(context.Context, *Conn, DidChangeTextDocumentParams) error
	OnWillSaveTextDocument          func(context.Context, *Conn, WillSaveTextDocumentParams) error
	OnWillSaveWaitUntilTextDocument func(context.Context, *Conn, WillSaveTextDocumentParams) ([]TextEdit, error)
	OnDidSaveTextDocument           func(context.Context, *Conn, DidSaveTextDocumentParams) error
	OnDidCloseTextDocument          func(context.Context, *Conn, DidCloseTextDocumentParams) error
	OnCompletion                    func(context.Context, *Conn, CompletionParams) (CompletionList, error)
	OnCompletionItemResolve         func(context.Context, *Conn, CompletionItem) (CompletionItem, error)
	OnHover                         func(context.Context, *Conn, HoverParams) (*Hover, error)
	OnSignatureHelp                 func(context.Context, *Conn, SignatureHelpParams) (*SignatureHelp, error)
	OnDeclaration                   func(context.Context, *Conn, DeclarationParams) ([]interface{}, error)
	OnDefinition                    func(context.Context, *Conn, DefinitionParams) ([]interface{}, error)
	OnTypeDefinition                func(context.Context, *Conn, TypeDefinitionParams) ([]interface{}, error)
	OnImplementation                func(context.Context, *Conn, ImplementationParams) ([]interface{}, error)
	OnReferences                    func(context.Context, *Conn, ReferenceParams) ([]Location, error)
	OnDocumentHighlight             func(context.Context, *Conn, DocumentHighlightParams) ([]DocumentHighlight, error)
	OnDocumentSymbol                func(context.Context, *Conn, DocumentSymbolParams) ([]interface{}, error)
	OnCodeAction                    func(context.Context, *Conn, CodeActionParams) ([]interface{}, error)
	OnCodeLens                      func(context.Context, *Conn, CodeLensParams) ([]CodeLens, error)
	OnCodeLensResolve               func(context.Context, *Conn, CodeLens) (CodeLens, error)
	OnDocumentLink                  func(context.Context, *Conn, DocumentLinkParams) ([]DocumentLink, error)
	OnDocumentLinkResolve           func(context.Context, *Conn, DocumentLink) (DocumentLink, error)
	OnDocumentColor                 func(context.Context, *Conn, DocumentColorParams) ([]ColorInformation, error)
	OnColorPresentation             func(context.Context, *Conn, ColorPresentationParams) ([]ColorPresentation, error)
	OnDocumentFormatting            func(context.Context, *Conn, DocumentFormattingParams) ([]TextEdit, error)
	OnDocumentRangeFormatting       func(context.Context, *Conn, DocumentRangeFormattingParams) ([]TextEdit, error)
	OnDocumentOnTypeFormatting      func(context.Context, *Conn, DocumentOnTypeFormattingParams) ([]TextEdit, error)
	OnRename                        func(context.Context, *Conn, RenameParams) (*WorkspaceEdit, error)
	OnPrepareRename                 func(context.Context, *Conn, TextDocumentPositionParams) (interface{}, error)
	OnFoldingRange                  func(context.Context, *Conn, FoldingRangeParams) ([]FoldingRange, error)
	OnSelectionRange                func(context.Context, *Conn, SelectionRangeParams) ([]SelectionRange, error)
	// contains filtered or unexported fields
}

func (*Server) Serve

func (s *Server) Serve(ctx context.Context) error

type ServerCapabilities

type ServerCapabilities struct {
	TextDocumentSync                 *TextDocumentSyncOptions           `json:"textDocumentSync,omitempty"`
	CompletionProvider               *CompletionOptions                 `json:"completionProvider,omitempty"`
	HoverProvider                    *HoverOptions                      `json:"hoverProvider,omitempty"`
	SignatureHelpProvider            *SignatureHelpOptions              `json:"signatureHelpProvider,omitempty"`
	DeclarationProvider              *DeclarationRegistrationOptions    `json:"declarationProvider,omitempty"`
	DefinitionProvider               *DefinitionOptions                 `json:"definitionProvider,omitempty"`
	TypeDefinitionProvider           *TypeDefinitionRegistrationOptions `json:"typeDefinitionProvider,omitempty"`
	ImplementationProvider           *ImplementationRegistrationOptions `json:"implementationProvider,omitempty"`
	ReferencesProvider               *ReferenceOptions                  `json:"referencesProvider,omitempty"`
	DocumentHighlightProvider        *DocumentHighlightOptions          `json:"documentHighlightProvider,omitempty"`
	DocumentSymbolProvider           *DocumentSymbolOptions             `json:"documentSymbolProvider,omitempty"`
	CodeActionProvider               *CodeActionOptions                 `json:"codeActionProvider,omitempty"`
	CodeLensProvider                 *CodeLensOptions                   `json:"codeLensProvider,omitempty"`
	DocumentLinkProvider             *DocumentLinkOptions               `json:"documentLinkProvider,omitempty"`
	ColorProvider                    *DocumentColorRegistrationOptions  `json:"colorProvider,omitempty"`
	DocumentFormattingProvider       *DocumentFormattingOptions         `json:"documentFormattingProvider,omitempty"`
	DocumentRangeFormattingProvider  *DocumentRangeFormattingOptions    `json:"documentRangeFormattingProvider,omitempty"`
	DocumentOnTypeFormattingProvider *DocumentOnTypeFormattingOptions   `json:"documentOnTypeFormattingProvider,omitempty"`
	RenameProvider                   *RenameOptions                     `json:"renameProvider,omitempty"`
	FoldingRangeProvider             *FoldingRangeRegistrationOptions   `json:"foldingRangeProvider,omitempty"`
	ExecuteCommandProvider           *ExecuteCommandOptions             `json:"executeCommandProvider,omitempty"`
	WorkspaceSymbolProvder           bool                               `json:"workspaceSymbolProvder,omitempty"`
	Workspace                        *struct {
		WorkspaceFolders *WorkspaceFoldersServerCapabilities `json:"workspaceFolders,omitempty"`
	} `json:"workspace,omitempty"`
	Experimental interface{} `json:"experimental,omitempty"`
}

type ServerInfo

type ServerInfo struct {
	Name    string `json:"name"`
	Version string `json:"version,omitempty"`
}

type SignatureHelp

type SignatureHelp struct {
	Signatures      []SignatureInformation `json:"signatures"`
	ActiveSignature int                    `json:"activeSignature,omitempty"`
	ActiveParameter int                    `json:"activeParameter,omitempty"`
}

type SignatureHelpClientCapabilities

type SignatureHelpClientCapabilities struct {
	DynamicRegistration  bool `json:"dynamicRegistration,omitempty"`
	SignatureInformation *struct {
		DocumentationFormat  []MarkupKind `json:"documentationFormat,omitempty"`
		ParameterInformation *struct {
			LabelOffsetSupport bool `json:"labelOffsetSupport,omitempty"`
		} `json:"parameterInformation,omitempty"`
	} `json:"signatureInformation,omitempty"`
	ContextSupport bool `json:"contextSupport,omitempty"`
}

type SignatureHelpContext

type SignatureHelpContext struct {
	TriggerKind         SignatureHelpTriggerKind `json:"triggerKind"`
	TriggerCharacter    string                   `json:"triggerCharacter,omitempty"`
	IsRetrigger         bool                     `json:"isRetrigger"`
	ActiveSignatureHelp *SignatureHelp           `json:"activeSignatureHelp,omitempty"`
}

type SignatureHelpOptions

type SignatureHelpOptions struct {
	WorkDoneProgressOptions
	TriggerCharacters   []string `json:"triggerCharacters,omitempty"`
	RetriggerCharacters []string `json:"retriggerCharacters,omitempty"`
}

type SignatureHelpParams

type SignatureHelpParams struct {
	TextDocumentPositionParams
	WorkDoneProgressParams
	Context *SignatureHelpContext `json:"context,omitempty"`
}

type SignatureHelpRegistrationOptions

type SignatureHelpRegistrationOptions struct {
	TextDocumentRegistrationOptions
	SignatureHelpOptions
}

type SignatureHelpTriggerKind

type SignatureHelpTriggerKind int
const (
	SignatureHelpTriggerKindUnknown SignatureHelpTriggerKind = iota
	SignatureHelpTriggerKindInvoked
	SignatureHelpTriggerKindTriggerCharacter
	SignatureHelpTriggerKindContentChange
)

type SignatureInformation

type SignatureInformation struct {
	Label         string                 `json:"label"`
	Documentation interface{}            `json:"documentation,omitempty"` // string | MarkupContent
	Parameters    []ParameterInformation `json:"parameters,omitempty"`
}

type StaticRegistrationOptions

type StaticRegistrationOptions struct {
	ID string `json:"id,omitempty"`
}

type SymbolInformation

type SymbolInformation struct {
	Name          string     `json:"name"`
	Kind          SymbolKind `json:"kind"`
	Deprecated    bool       `json:"deprecated,omitempty"`
	Location      Location   `json:"location"`
	ContainerName string     `json:"containerName,omitempty"`
}

type SymbolKind

type SymbolKind int
const (
	SymbolKindUnknown SymbolKind = iota
	SymbolKindFile
	SymbolKindModule
	SymbolKindNamespace
	SymbolKindPackage
	SymbolKindClass
	SymbolKindMethod
	SymbolKindProperty
	SymbolKindField
	SymbolKindConstructor
	SymbolKindEnum
	SymbolKindInterface
	SymbolKindFunction
	SymbolKindVariable
	SymbolKindConstant
	SymbolKindString
	SymbolKindNumber
	SymbolKindBoolean
	SymbolKindArray
	SymbolKindObject
	SymbolKindKey
	SymbolKindNull
	SymbolKindEnumMember
	SymbolKindStruct
	SymbolKindEvent
	SymbolKindOperator
	SymbolKindTypeParameter
)

type TextDocumentClientCapabilities

type TextDocumentClientCapabilities struct {
	Synchronization    *TextDocumentSyncClientCapabilities        `json:"synchronization,omitempty"`
	Completion         *CompletionClientCapabilities              `json:"completion,omitempty"`
	Hover              *HoverClientCapabilities                   `json:"hover,omitempty"`
	SignatureHelp      *SignatureHelpClientCapabilities           `json:"signatureHelp,omitempty"`
	Declaration        *DeclarationClientCapabilities             `json:"declaration,omitempty"`
	Definition         *DefinitionClientCapabilities              `json:"definition,omitempty"`
	TypeDefinition     *TypeDefinitionClientCapabilities          `json:"typeDefinition,omitempty"`
	Implementation     *ImplementationClientCapabilities          `json:"implementation,omitempty"`
	References         *ReferenceClientCapabilities               `json:"references,omitempty"`
	DocumentHighlight  *DocumentHighlightClientCapabilities       `json:"documentHighlight,omitempty"`
	DocumentSymbol     *DocumentSymbolClientCapabilities          `json:"documentSymbol,omitempty"`
	CodeAction         *CodeActionClientCapabilities              `json:"codeAction,omitempty"`
	CodeLens           *CodeLensClientCapabilities                `json:"codeLens,omitempty"`
	DocumentLink       *DocumentLinkClientCapabilities            `json:"documentLink,omitempty"`
	ColorProvider      *DocumentColorClientCapabilities           `json:"colorProvider,omitempty"`
	Formatting         *DocumentFormattingClientCapabilities      `json:"formatting,omitempty"`
	RangeFormatting    *DocumentRangeFormattingClientCapabilities `json:"rangeFormatting,omitempty"`
	OnTypeFormatting   *DocumentOnTypeFormattingClientCapabilites `json:"onTypeFormatting,omitempty"`
	Rename             *RenameClientCapabilities                  `json:"rename,omitempty"`
	PublishDiagnostics *PublishDiagnosticsClientCapabilities      `json:"publishDiagnostics,omitempty"`
	FoldingRange       *FoldingRangeClientCapabilites             `json:"foldingRange,omitempty"`
	SelectionRange     *SelectionRangeClientCapabilities          `json:"selectionRange,omitempty"`
}

type TextDocumentContentChangeEvent

type TextDocumentContentChangeEvent struct {
	Range       *Range `json:"range,omitempty"`
	RangeLength int    `json:"rangeLength,omitempty"` // deprecated
	Text        string `json:"text"`
}

type TextDocumentEdit

type TextDocumentEdit struct {
	TextDocument VersionedTextDocumentIdentifier `json:"textDocument"`
	Edits        []TextEdit                      `json:"edits"`
}

type TextDocumentIdentifier

type TextDocumentIdentifier struct {
	URI DocumentURI `json:"uri"`
}

type TextDocumentItem

type TextDocumentItem struct {
	URI        DocumentURI `json:"uri"`
	LanguageID string      `json:"languageId"`
	Version    int         `json:"version"`
	Text       string      `json:"text"`
}

type TextDocumentPositionParams

type TextDocumentPositionParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Position     Position               `json:"position"`
}

type TextDocumentRegistrationOptions

type TextDocumentRegistrationOptions struct {
	DocumentSelector *DocumentSelector `json:"documentSelector,omitempty"`
}

type TextDocumentSaveReason

type TextDocumentSaveReason int
const (
	TextDocumentSaveReasonUnknown TextDocumentSaveReason = iota
	TextDocumentSaveReasonManual
	TextDocumentSaveReasonAfterDelay
	TextDocumentSaveReasonFocusOut
)

type TextDocumentSyncClientCapabilities

type TextDocumentSyncClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
	WillSave            bool `json:"willSave,omitempty"`
	WillSaveWaitUntil   bool `json:"willSaveWaitUntil,omitempty"`
	DidSave             bool `json:"didSave,omitempty"`
}

type TextDocumentSyncKind

type TextDocumentSyncKind int
const (
	TextDocumentSyncKindNone TextDocumentSyncKind = iota
	TextDocumentSyncKindFull
	TextDocumentSyncKindIncremental
)

type TextDocumentSyncOptions

type TextDocumentSyncOptions struct {
	OpenClose bool                 `json:"openClose,omitempty"`
	Change    TextDocumentSyncKind `json:"change,omitempty"`
}

type TextEdit

type TextEdit struct {
	Range   Range  `json:"range"`
	NewText string `json:"newText"`
}

type TraceConfig

type TraceConfig string
const (
	TraceConfigOff      TraceConfig = "off"
	TraceConfigMessages TraceConfig = "messages"
	TraceConfigVerbose  TraceConfig = "verbose"
)

type TypeDefinitionClientCapabilities

type TypeDefinitionClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
	LinkSupport         bool `json:"linkSupport,omitempty"`
}

type TypeDefinitionOptions

type TypeDefinitionOptions struct {
	WorkDoneProgressOptions
}

type Unregistration

type Unregistration struct {
	ID     string `json:"id"`
	Method string `json:"method"`
}

type VersionedTextDocumentIdentifier

type VersionedTextDocumentIdentifier struct {
	TextDocumentIdentifier
	Version *int `json:"version"`
}

type WatchKind

type WatchKind int
const (
	WatchKindCreate WatchKind = 1 << iota
	WatchKindChange
	WatchKindDelete
)

type WillSaveTextDocumentParams

type WillSaveTextDocumentParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Reason       TextDocumentSaveReason `json:"reason"`
}

type WindowClientCapabilities

type WindowClientCapabilities struct {
	WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
}

type WorkDoneProgressBegin

type WorkDoneProgressBegin struct {
	Kind        string `json:"kind"`
	Title       string `json:"title"`
	Cancellable bool   `json:"cancellable,omitempty"`
	Message     string `json:"message,omitempty"`
	Percentage  int    `json:"percentage,omitempty"`
}

type WorkDoneProgressEnd

type WorkDoneProgressEnd struct {
	Kind    string `json:"kind"`
	Message string `json:"message,omitempty"`
}

type WorkDoneProgressOptions

type WorkDoneProgressOptions struct {
	WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
}

type WorkDoneProgressParams

type WorkDoneProgressParams struct {
	WorkDoneToken *ProgressToken `json:"workDoneToken,omitempty"`
}

type WorkDoneProgressReport

type WorkDoneProgressReport struct {
	Kind        string `json:"kind"`
	Cancellable bool   `json:"cancellable,omitempty"`
	Message     string `json:"message,omitempty"`
	Percentage  int    `json:"percentage,omitempty"`
}

type WorkspaceClientCapabilities

type WorkspaceClientCapabilities struct {
	ApplyEdit              bool                                      `json:"applyEdit,omitempty"`
	WorkspaceEdit          *WorkspaceEditClientCapabilities          `json:"workspaceEdit,omitempty"`
	DidChangeConfiguration *DidChangeConfigurationClientCapabilities `json:"didChangeConfiguration,omitempty"`
	DidChangeWatchedFiles  *DidChangeWatchedFilesClientCapabilities  `json:"didChangeWatchedFiles,omitempty"`
	Symbol                 *WorkspaceSymbolClientCapabilities        `json:"symbol,omitempty"`
	ExecuteCommand         *ExecuteCommandClientCapabilities         `json:"executeCommand,omitempty"`
	WorkspaceFolders       bool                                      `json:"workspaceFolders,omitempty"`
	Configuration          bool                                      `json:"configuration,omitempty"`
}

type WorkspaceEdit

type WorkspaceEdit struct {
	Changes         map[DocumentURI][]TextEdit `json:"changes,omitempty"`
	DocumentChanges *DocumentChanges           `json:"documentChanges,omitempty"`
}

type WorkspaceEditClientCapabilities

type WorkspaceEditClientCapabilities struct {
	DocumentChanges    bool                    `json:"documentChanges,omitempty"`
	ResourceOperations []ResourceOperationKind `json:"resourceOperations,omitempty"`
	FailureHandling    FailureHandlingKind     `json:"failureHandling,omitempty"`
}

type WorkspaceFolder

type WorkspaceFolder struct {
	URI  DocumentURI `json:"uri"`
	Name string      `json:"name"`
}

type WorkspaceFoldersChangeEvent

type WorkspaceFoldersChangeEvent struct {
	Added   []WorkspaceFolder `json:"added"`
	Removed []WorkspaceFolder `json:"removed"`
}

type WorkspaceFoldersServerCapabilities

type WorkspaceFoldersServerCapabilities struct {
	Supported           bool        `json:"supported,omitempty"`
	ChangeNotifications interface{} `json:"changeNotifications,omitempty"`
}

type WorkspaceSymbolClientCapabilities

type WorkspaceSymbolClientCapabilities struct {
	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
	SymbolKind          *struct {
		ValueSet []SymbolKind `json:"valueSet,omitempty"`
	} `json:"symbolKind,omitempty"`
}

type WorkspaceSymbolParams

type WorkspaceSymbolParams struct {
	WorkDoneProgressParams
	PartialResultParams
	Query string `json:"query"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址