private static int highlightElement(Editor editor, PsiElement element, Config cfg, int offset) {
        final RangeHighlighter highlighter = HighlighterUtil.highlightNode(editor, element, cfg.getAttributes(), cfg);
        HighlighterUtil.addHighlighter(editor, highlighter);

        return Math.min(highlighter.getStartOffset(), offset);
    }
private static int highlightElement(Editor editor, PsiElement element, Config cfg, int offset)