Skip to content

CodeActionProvider

原文链接

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

代码操作接口定义了扩展和灯泡功能之间的契约。

ts
interface CodeActionProvider {
    provideCodeActions(model, range, context, token): ProviderResult<CodeActionList>;
    resolveCodeAction?(codeAction, token): ProviderResult<CodeAction>;
}

provideCodeActions

resolveCodeAction