Skip to content

CodeLensProvider

原文链接

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

ts
interface CodeLensProvider {
    onDidChange?: IEvent<CodeLensProvider>;
    provideCodeLenses(model, token): ProviderResult<CodeLensList>;
    resolveCodeLens?(model, codeLens, token): ProviderResult<CodeLens>;
}

onDidChange

provideCodeLenses

resolveCodeLens