Skip to content

DocumentSemanticTokensProvider

原文链接

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

ts
interface DocumentSemanticTokensProvider {
    onDidChange?: IEvent<void>;
    getLegend(): SemanticTokensLegend;
    provideDocumentSemanticTokens(model, lastResultId, token): ProviderResult<SemanticTokens | SemanticTokensEdits>;
    releaseDocumentSemanticTokens(resultId): void;
}

onDidChange

getLegend

provideDocumentSemanticTokens

releaseDocumentSemanticTokens

  • 语法: releaseDocumentSemanticTokens(resultId): void
  • 参数:resultId: string