vscode

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

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 Capability struct {
	DynamicRegistration bool `json:"dynamicRegistration"`
	WillSave            bool `json:"willSave"`
	WillSaveWaitUntil   bool `json:"willSaveWaitUntil"`
	DidSave             bool `json:"didSave"`
}

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 DefinitionParams struct {
	TextDocument struct {
		URI uri.URI `json:"uri"`
	} `json:"textDocument"`
	Position Position `json:"position"`
}

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 FileEvent

type FileEvent struct {
	URI  uri.URI `json:"uri"`
	Type int     `json:"type"`
}

type InitializeParams

type InitializeParams struct {
	ProcessID    int                  `json:"processId"`
	RootPath     string               `json:"rootPath"`
	RootURI      uri.URI              `json:"rootUri"`
	Capabilities CapabilitiesSections `json:"capabilities"`
	Trace        string               `json:"trace"`
}

type Location

type Location struct {
	URI   uri.URI `json:"uri"`
	Range Range   `json:"range"`
}

type Position

type Position struct {
	/**
	 * Line position in a document (zero-based).
	 */
	Line int `json:"line"`

	/**
	 * Character offset on a line in a document (zero-based).
	 */
	Character int `json:"character"`
}

type PublishDiagnosticsParams

type PublishDiagnosticsParams struct {
	/**
	 * The URI for which diagnostic information is reported.
	 */
	URI uri.URI `json:"uri"`

	/**
	 * An array of diagnostic information items.
	 */
	Diagnostics []Diagnostic `json:"diagnostics"`
}

type Range

type Range struct {
	/**
	 * The range's start position
	 */
	Start Position `json:"start"`

	/**
	 * The range's end position
	 */
	End Position `json:"end"`
}

type ReferencesParams

type ReferencesParams struct {
	TextDocument struct {
		URI uri.URI `json:"uri"`
	} `json:"textDocument"`
	Position Position `json:"position"`
	Context  struct {
		IncludeDeclaration bool `json:"includeDeclaration"`
	} `json:"context"`
}

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     uri.URI `json:"uri"`
		Version int     `json:"version"`
	} `json:"textDocument"`
	ContentChanges []ContentChange `json:"contentChanges"`
}

type TextDocumentDidOpenParams

type TextDocumentDidOpenParams struct {
	TextDocument struct {
		URI        uri.URI `json:"uri"`
		LanguageID string  `json:"languageId"`
		Version    int     `json:"version"`
		Text       string  `json:"text"`
	} `json:"textDocument"`
}

type WorkspaceCapabilities

type WorkspaceCapabilities struct {
	ApplyEdit              bool
	DidChangeConfiguration Capability `json:"didChangeConfiguration"`
	DidChangeWatchedFiles  Capability `json:"didChangeWatchedFiles"`
	Symbol                 Capability `json:"symbol"`
	ExecuteCommand         Capability `json:"executeCommand"`
}

Jump to

Keyboard shortcuts

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