Represents a reference to a command. Provides a title which
will be used to represent a command in the UI and, optionally,
an array of arguments which will be passed to the command handler
function when invoked.
In many cases the items of an actual completion result share the same
value for properties like commitCharacters or the range of a text
edit. A completion list can therefore define item defaults which will
be used if a completion item itself doesn’t specify the value.
Represents a related message and source code location for a diagnostic. This should be
used to point to code locations that cause or related to a diagnostics, e.g when duplicating
a symbol in a scope.
A document highlight is a range inside a text document which deserves
special attention. Usually a document highlight is visualized by changing
the background color of its range.
Represents programming constructs like variables, classes, interfaces etc.
that appear in a document. Document symbols can be hierarchical and they
have two ranges: one that encloses its definition and one that points to
its most interesting range, e.g. the range of an identifier.
Represents a folding range. To be valid, start and end line must be bigger than zero and smaller
than the number of lines in the document. Clients are free to ignore invalid ranges.
Provide an inline value through an expression evaluation.
If only a range is specified, the expression will be extracted from the underlying document.
An optional expression can be used to override the extracted expression.
Provide inline value through a variable lookup.
If only a range is specified, the variable name will be extracted from the underlying document.
An optional variable name can be used to override the extracted name.
A MarkupContent literal represents a string value which content is interpreted base on its
kind flag. Currently the protocol supports plaintext and markdown as markup kinds.
Position in a text document expressed as zero-based line and character
offset. Prior to 3.17 the offsets were always based on a UTF-16 string
representation. So a string of the form a𐐀b the character offset of the
character a is 0, the character offset of 𐐀 is 1 and the character
offset of b is 3 since 𐐀 is represented using two code units in UTF-16.
Since 3.17 clients and servers can agree on a different string encoding
representation (e.g. UTF-8). The client announces it’s supported encoding
via the client capability general.positionEncodings.
The value is an array of position encodings the client supports, with
decreasing preference (e.g. the encoding at index 0 is the most preferred
one). To stay backwards compatible the only mandatory encoding is UTF-16
represented via the string utf-16. The server can pick one of the
encodings offered by the client and signals that encoding back to the
client via the initialize result’s property
capabilities.positionEncoding. If the string value
utf-16 is missing from the client’s capability general.positionEncodings
servers can safely assume that the client supports UTF-16. If the server
omits the position encoding in its initialize result the encoding defaults
to the string value utf-16. Implementation considerations: since the
conversion from one encoding into another requires the content of the
file / line the conversion is best done where the file is read which is
usually on the server side.
A relative pattern is a helper to construct glob patterns that are matched
relatively to a base URI. The common value for a baseUri is a workspace
folder root, but it can be another absolute URI as well.
Describes textual changes on a text document. A TextDocumentEdit describes all changes
on a document version Si and after they are applied move the document to version Si+1.
So the creator of a TextDocumentEdit doesn’t need to sort the array of edits or do any
kind of ordering. However the edits must be non overlapping.
A workspace edit represents changes to many resources managed in the workspace. The edit
should either provide changes or documentChanges. If documentChanges are present
they are preferred over changes if the client can handle versioned document edits.
Request to resolve additional information for a given code action.The request’s
parameter is of type CodeAction the response
is of type CodeAction or a Thenable that resolves to such.
A request to list all presentation for a color. The request’s
parameter is of type ColorPresentationParams the
response is of type ColorInformation[] or a Thenable
that resolves to such.
Request to request completion at a given text document position. The request’s
parameter is of type [TextDocumentPosition] the response
is of type CompletionItem[] or CompletionList
or a Thenable that resolves to such.
Request to resolve additional information for a given completion item.The request’s
parameter is of type CompletionItem the response
is of type CompletionItem or a Thenable that resolves to such.
A request to resolve the type definition locations of a symbol at a given text
document position. The request’s parameter is of type TextDocumentPositionParams
the response is of type Declaration or a typed array of DeclarationLink
or a Thenable that resolves to such.
The definition of a symbol represented as one or many locations.
For most programming languages there is only one location at which a symbol is
defined.
A request to resolve the definition location of a symbol at a given text
document position. The request’s parameter is of type [TextDocumentPosition]
the response is of either type Definition or a typed array of
DefinitionLink or a Thenable that resolves to such.
The configuration change notification is sent from the client to the server
when the client’s configuration has changed. The notification contains
the changed configuration as defined by the language client.
The document close notification is sent from the client to the server when
the document got closed in the client. The document’s truth now exists where
the document’s uri points to (e.g. if the document’s uri is a file uri the
truth now exists on disk). As with the open notification the close notification
is about managing the document’s content. Receiving a close notification
doesn’t mean that the document was open in an editor before. A close
notification requires a previous open notification to be sent.
The will delete files request is sent from the client to the server before files are actually
deleted as long as the deletion is triggered from within the client.
The document open notification is sent from the client to the server to signal
newly opened text documents. The document’s truth is now managed by the client
and the server must not try to read the document’s truth using the document’s
uri. Open in this sense means it is managed by the client. It doesn’t necessarily
mean that its content is presented in an editor. An open notification must not
be sent more than once without a corresponding close notification send before.
This means open and close notification must be balanced and the max open count
is one.
A request to list all color symbols found in a given text document. The request’s
parameter is of type DocumentColorParams the
response is of type ColorInformation[] or a Thenable
that resolves to such.
The result of a document diagnostic pull request. A report can
either be a full report containing all diagnostics for the
requested document or an unchanged report indicating that nothing
has changed in terms of diagnostics in comparison to the last
pull request.
Request to resolve a DocumentHighlight for a given
text document position. The request’s parameter is of type [TextDocumentPosition]
the request response is an array of type DocumentHighlight
or a Thenable that resolves to such.
Request to resolve additional information for a given document link. The request’s
parameter is of type DocumentLink the response
is of type DocumentLink or a Thenable that resolves to such.
A request to list all symbols found in a given text document. The request’s
parameter is of type TextDocumentIdentifier the
response is of type SymbolInformation[] or a Thenable
that resolves to such.
A request send from the client to the server to execute a command. The request might return
a workspace edit which the client will apply to the workspace.
A request to provide folding ranges in a document. The request’s
parameter is of type FoldingRangeParams, the
response is of type [FoldingRangeList] or a Thenable
that resolves to such.
Request to request hover information at a given text document position. The request’s
parameter is of type [TextDocumentPosition] the response is of
type Hover or a Thenable that resolves to such.
A request to resolve the implementation locations of a symbol at a given text
document position. The request’s parameter is of type TextDocumentPositionParams
the response is of type Definition or a Thenable that resolves to such.
The initialize request is sent from the client to the server.
It is sent once as the request after starting up the server.
The requests parameter is of type InitializeParams
the response if of type InitializeResult of a Thenable that
resolves to such.
The initialized notification is sent from the client to the
server after the client is fully initialized and the server
is allowed to send requests from the server to the client.
A request to provide inlay hints in a document. The request’s parameter is of
type [InlayHintsParams], the response is of type
InlayHint[] or a Thenable that resolves to such.
A request to resolve additional properties for an inlay hint.
The request’s parameter is of type InlayHint, the response is
of type InlayHint or a Thenable that resolves to such.
A request to provide inline completions in a document. The request’s parameter is of
type InlineCompletionParams, the response is of type
[InlineCompletion[]][InlineCompletion] or a Thenable that resolves to such.
A request to provide inline values in a document. The request’s parameter is of
type InlineValueParams, the response is of type
InlineValue[] or a Thenable that resolves to such.
MarkedString can be used to render human readable text. It is either a markdown string
or a code-block that provides a language and a code snippet. The language identifier
is semantically equal to the optional language identifier in fenced code blocks in GitHub
issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
A request to get the moniker of a symbol at a given text document position.
The request parameter is of type TextDocumentPositionParams.
The response is of type Moniker[] or null.
A notebook document filter denotes a notebook document by
different properties. The properties will be match
against the notebook’s URI (same as with documents)
A request to resolve project-wide references for the symbol denoted
by the given text document position. The request’s parameter is of
type ReferenceParams the response is of type
Location[] or a Thenable that resolves to such.
A request to provide selection ranges in a document. The request’s
parameter is of type SelectionRangeParams, the
response is of type SelectionRange[] or a Thenable
that resolves to such.
A request to show a document. This request might open an
external program depending on the value of the URI to open.
For example a request to open https://code.visualstudio.com/
will very likely open the URI in a WEB browser.
A shutdown request is sent from the client to the server.
It is sent once when the client decides to shutdown the
server. The only notification that is sent after a shutdown request
is the exit event.
A document filter denotes a document by different properties like
the [language][TextDocument::languageId], the [scheme][Uri::scheme] of
its resource, or a glob-pattern that is applied to the [path][TextDocument::fileName].
A request to resolve the type definition locations of a symbol at a given text
document position. The request’s parameter is of type TextDocumentPositionParams
the response is of type Definition or a Thenable that resolves to such.
The client/unregisterCapability request is sent from the server to the client to unregister a previously registered capability
handler on the client side.
The will create files request is sent from the client to the server before files are actually
created as long as the creation is triggered from within the client.
The will rename files request is sent from the client to the server before files are actually
renamed as long as the rename is triggered from within the client.
A document will save request is sent from the client to the server before
the document is actually saved. The request can return an array of TextEdits
which will be applied to the text document before it is saved. Please note that
clients might drop results if computing the text edits took too long or if a
server constantly fails on this request. This is done to keep the save fast and
reliable.
A request to list project-wide symbols matching the query string given
by the WorkspaceSymbolParams. The response is
of type SymbolInformation[] or a Thenable that
resolves to such.
The LSP any type.
Please note that strictly speaking a property with the value undefined
can’t be converted into JSON preserving the property name. However for
convenience it is allowed and assumed that all these properties are
optional as well.
@since 3.17.0