Provide completion items for the given position and document.
The document in which the command was invoked.
The position at which the command was invoked.
A cancellation token.
How the completion was triggered.
An array of completions, a completion list, or a thenable that resolves to either.
The lack of a result can be signaled by returning undefined
, null
, or an empty array.
Given a completion item fill in more data, like doc-comment or details.
The editor will only resolve a completion item once.
A completion item currently active in the UI.
A cancellation token.
The resolved completion item or a thenable that resolves to of such. It is OK to return the given
item
. When no result is returned, the given item
will be used.
The completion item provider interface defines the contract between extensions and IntelliSense
Providers can delay the computation of the
detail
anddocumentation
properties by implementing theresolveCompletionItem
-function. However, properties that are needed for the initial sorting and filtering, likesortText
,filterText
,insertText
, andrange
, must not be changed during resolve.Providers are asked for completions either explicitly by a user gesture or -depending on the configuration- implicitly when typing words or trigger characters.