Skip to content

CompletionItemProvider

原文链接

https://microsoft.github.io/monaco-editor/docs.html#interfaces/languages.CompletionItemProvider.html

完成项提供程序接口定义扩展和IntelliSense之间的约定。

ts
interface CompletionItemProvider {
    triggerCharacters?: string[];
    provideCompletionItems(model, position, context, token): ProviderResult<CompletionList>;
    resolveCompletionItem?(item, token): ProviderResult<CompletionItem>;
}

triggerCharacters

  • 类型: string[]

provideCompletionItems

resolveCompletionItem