@Override
  public TextAttributesKey @NotNull [] getTokenHighlights(IElementType tokenType) {
    if (!(tokenType instanceof TextMateElementType)) return PLAIN_SYNTAX_HIGHLIGHTER.getTokenHighlights(tokenType);
    TextMateService service = TextMateService.getInstance();
    Map<CharSequence, TextMateTextAttributesAdapter> customHighlightingColors = service.getCustomHighlightingColors();

    Set<CharSequence> highlightingRules = ContainerUtil.union(customHighlightingColors.keySet(), TextMateTheme.INSTANCE.getRules());

    TextMateScope textMateScope = trimEmbeddedScope((TextMateElementType)tokenType);
    List<CharSequence> selectors = ContainerUtil.reverse(new TextMateScopeComparator<>(textMateScope, Function.identity())
                                                           .sortAndFilter(highlightingRules));
    return ContainerUtil.map2Array(selectors, TextAttributesKey.class, rule -> {
      TextMateTextAttributesAdapter customTextAttributes = customHighlightingColors.get(rule);
      return customTextAttributes != null ? customTextAttributes.getTextAttributesKey(TextMateTheme.INSTANCE)
                                          : TextMateTheme.INSTANCE.getTextAttributesKey(rule);
    });
  }
@Override
  public TextAttributesKey @NotNull [] getTokenHighlights(IElementType tokenType)