Drupal 8: Template suggestion for form-element in a views exposed filter is not working In Drupal 8 I am trying to add in a suggestion via hook_theme_suggestions_alter() like so:

function ua_sc_theme_theme_suggestions_alter(array &amp;$suggestions, array $variables, $hook) {
  print '&lt;!-- hook: ' . $hook . '--&gt;';
  if (in_array($hook, ['input', 'form_element']) &amp;&amp; $variables['element']['#attributes']['id'] == 'edit-keys') {
    $suggestions[] = $hook . '__custom';
  }
}


...and then I give my template a name of form-element__custom.html.twig and put it in my theme it doesn't get used an instead the default form-element.html.twig template is used. Any thoughts on what is going on?
Ok, looks like I was too tired. The problem was that the template should be called form-element--custom.html.twig.

Notice the '--' (double dash) instead of the __ (double underscore). 

I also ended up using the more specific hook alter:

hook_theme_suggestions_HOOK_alter


...where HOOK for me was form_element.