提交 f8665216 编写于 作者: J Johannes Rieken

clarify resolveCompletionItem, #26622

上级 70900a51
......@@ -2909,12 +2909,11 @@ declare module 'vscode' {
* The completion item provider interface defines the contract between extensions and
* [IntelliSense](https://code.visualstudio.com/docs/editor/intellisense).
*
* When computing *complete* completion items is expensive, providers can optionally implement
* the `resolveCompletionItem`-function. In that case it is enough to return completion
* items with a [label](#CompletionItem.label) from the
* [provideCompletionItems](#CompletionItemProvider.provideCompletionItems)-function. Subsequently,
* when a completion item is shown in the UI and gains focus this provider is asked to resolve
* the item, like adding [doc-comment](#CompletionItem.documentation) or [details](#CompletionItem.detail).
* Providers can delay the computation of the [`detail`](#CompletionItem.detail)
* and [`documentation`](#CompletionItem.documentation) properties by implementing the
* [`resolveCompletionItem`](#CompletionItemProvider.resolveCompletionItem)-function. However, properties that
* are needed for the inital sorting and filtering, like `sortText`, `filterText`, `insertText`, and `range`, 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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册