registerDocumentRangeSemanticTokensProvider method

Disposable registerDocumentRangeSemanticTokensProvider(
  1. Object selector,
  2. DocumentRangeSemanticTokensProvider provider,
  3. SemanticTokensLegend legend
)

Register a semantic tokens provider for a document range.

Note: If a document has both a DocumentSemanticTokensProvider and a DocumentRangeSemanticTokensProvider, the range provider will be invoked only initially, for the time in which the full document provider takes to resolve the first request. Once the full document provider resolves the first request, the semantic tokens provided via the range provider will be discarded and from that point forward, only the document provider will be used.

Multiple providers can be registered for a language. In that case providers are sorted by their {@link languages.matchscore} and the best-matching provider is used. Failure of the selected provider will cause a failure of the whole operation.

Implementation

_i3.Disposable registerDocumentRangeSemanticTokensProvider(
  _i2.Object selector,
  _i3.DocumentRangeSemanticTokensProvider provider,
  _i3.SemanticTokensLegend legend,
) =>
    _i4.callMethod(
      this,
      'registerDocumentRangeSemanticTokensProvider',
      [
        selector,
        provider,
        legend,
      ],
    );