How to limit a custom views filter to a certain display type? I'm creating a views filter, and I would like to limit it by display type.  How do I do that?

I'm creating a custom filter for the entity_browser view display (entity_browser/src/Plugin/views/display/EntityBrowser.php).

Since it's only relevant for this display, I would like it only appear in the list of filters when on that display.  How do I do that?
This works, you can use a form alter hook to check the display plugin, and then remove options from the AddHandler form.

/**
 * Implements hook_form_FORM_ID_alter().
 */
function entity_browser_form_views_ui_add_handler_form_alter(&amp;$form, FormStateInterface $form_state) {

  // Hide 'entity_browser_bundle' filter plugin for displays other than
  // entity_browser.
  $display_id = $form_state-&gt;get('display_id');
  $display_plugin = $form_state
    -&gt;get('view')
    -&gt;get('storage')
    -&gt;get('display')[$display_id]['display_plugin'];

  if ($display_plugin != 'entity_browser') {
    foreach ($form['options']['name']['#options'] as $key =&gt; $value) {
      if (strpos($key, 'entity_browser_bundle') !== FALSE) {
        unset($form['options']['name']['#options'][$key]);
      }
    }
  }
}