private static void setupIcon(@NotNull EditorTextField field, @NotNull JComponent icon) {
    field.addSettingsProvider(editor -> {
      icon.setBorder(JBUI.Borders.emptyLeft(2));
      final JScrollPane scrollPane = editor.getScrollPane();
      scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
      scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
      final JScrollBar verticalScrollBar = scrollPane.getVerticalScrollBar();
      verticalScrollBar.setBackground(editor.getBackgroundColor());
      verticalScrollBar.add(JBScrollBar.LEADING, icon);
      verticalScrollBar.setOpaque(true);
    });
  }
private static void setupIcon(@NotNull EditorTextField field, @NotNull JComponent icon)